Copy Text Button

Laskquestion
Tourist
8 0 2

How do I code a button that it will copy specific text to the clipboard?

For example: <p>DISCOUNTCODE</p>, customer will click on the button, and the <p>DISCOUNTCODE</p> will be copied to the user clipboard so he/she can paste it on checkout.

0 Likes