on click copy select and past content text in html php javascript jquery

Description

on click copy select and past content text in html php javascript jquery

html Js onclick button select, copy to clipboard using jQuery php

How do I copy and past to the clipboard in JavaScript

JavaScript Copy to Clipboard in php

oclick mouse right click, select, copy and paste using jQuery php

Onclick button and select and copy text in the input box textarea box and

past to another places.

Download the clipboardjs file or zip file

and pass the id name in data-clipboard-target 

https://clipboardjs.com

 <input type="text"  id='country_name' value="12345676" class="form-control boxed" name="phonecode" placeholder="Enter Phone" style="font-size:28px; color: #000000; height:65px;" maxlength="15" onKeyUp="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')"/>    

    <button class="btn" data-clipboard-action="copy" data-clipboard-target="#country_name">Copy</button>

    <!-- 2. Include library -->

    <script src="clipboard.min.js"></script>

    <!-- 3. Instantiate clipboard -->

    <script>

    var clipboard = new Clipboard('.btn');

    clipboard.on('success', function(e) {

        console.log(e);

    });

    clipboard.on('error', function(e) {

        console.log(e);

    });

    </script>