Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function kopiraj() {
- var copyText = document.getElementById("toCopy");
- copyText.select();
- document.execCommand("Copy");
- document.getElementById("telefon").innerHTML = 'Copied';
- }
- <button type="button" onclick="kopiraj()">Copy</button>
- <input type="hidden" id="toCopy" value="123456789">
- <p id="telefon"></p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement