clipboard.js allow you to directly copy the text to clipboard from data-clipboard-text. If you want to copy the text by clicking a span and copy some entered text to clipboard we can use the following example.
HTML Code
Script
Example Program:- (Editor)

Editor is Loading...
Advertisement
HTML Code
<div id="btn" data-clipboard-text="This will copy">
<span>Click here</span>
</div> Script
var clipboard = new Clipboard('#btn');Example Program:- (Editor)
Editor is Loading...
Advertisement
RSS Feed
Twitter
10:17
Muhammad Kaif

Posted in
0 comments:
Post a Comment