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
  </button>
</div>

 

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?

Thanks🙂

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...