DEV Community


Copy To Clipboard JQuery

websolutionstuff profile image Websolutionstuff Originally published at ・1 min read

In this small tutorial I will explain you how to copy text from one field to another field using java script, many time we have requirement to copy text value one field to another field, like current address and permanent address are same in this criteria copy to clipboard is useful to save our time.

So here I will give you some piece of code how to copy to clipboard using JQuery.

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Copy To Clipboard Using JQuery-websolutionstuff.cpm</title>
<script src=""></script>

    <textarea id="comment" rows="5" cols="50"></textarea>
    <p><button type="button">Get Value</button></p>
    <p><strong>Note:</strong> Type something in the textarea and click the button to see the output.</p>
Enter fullscreen mode Exit fullscreen mode

And Don't Forgot to Like, Share and Comment.

Read Also : How To Generate QRCode In Laravel

Discussion (1)

Editor guide

Some comments have been hidden by the post's author - find out more