0

I want to insert a button in my javascript code to copy this message to the clipboard.

"Text copied succesfully"

Any ideas?

<html>

<table>

 <tr>

  <th>CHILE</th>
  
 </tr>

 <tr>

  <td id="fM"></td>
  
 </tr>

<script>

 function Chile(){
     document.getElementById("fM").innerHTML = "Text copied succesfully";}
 Chile();

 
 
</script>
 
</table>
 
</html>
T100
  • 55
  • 1
  • 5
  • Check this question http://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript, you should be able to make it work for your code. – azs06 Feb 23 '17 at 22:02
  • Possible duplicate of [How do I copy to the clipboard in JavaScript?](http://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript) – gyre Feb 23 '17 at 22:07
  • This is not a duplicated question. I've already checked out the article mentioned above. – T100 Feb 23 '17 at 22:12

0 Answers0