Jump to content

Copy To Clipboard (Copy Text)


Recommended Posts

Thanks for the reply


With what you say, does anything need changing in the example to make this work?


Not sure here at all, but do the Text to be copied need their own id's/separate code to make it work?

Copy Button 1 - Hello World (as in the Demo)

<input type="text" value="Hello World" id="myInput">

<div class="tooltip">
<button onclick="myFunction()" onmouseout="outFunc()">
  <span class="tooltiptext" id="myTooltip">Copy to clipboard</span>
  Copy text


So if I want to add two more Copy Text buttons

Copy Text Button 2 - Hi World

Copy Text Button 3 - Hello People

Do these need their own code?


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...