Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. function copytoclipboard() {
  2. var posturl = document.getElementById("posturl");
  3. posturl.select();
  4. document.execCommand("copy");
  5. }
  6.  
  7. <a onclick="copytoclipboard()">Copy Link</a>
  8.  
  9. <input type="text" value="<%= request.original_url %>" id="posturl" style="opacity: 0;">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement