Summary:
Recently on the project to achieve a Click Button Copy link function, just started to find some information, find a few plug-ins, Zeroclipboard is through the flash implementation of the replication function, with more and more proposals to abolish flash, so I would like to be able to achieve copy cutting by JS?
Address: Https://github.com/baixuexiyang/clipBoard.js
Method:
Copy
var new ClipBoard (document.getElementById (' Data '), { function() { }, function () { return document.getElementById (' Data '). value; }, function() { }});
Shear
var new ClipBoard (document.getElementById (' Data '), { function() { }, function () { return document.getElementById (' Data '). value; }, function() { }});
Paste
var new ClipBoard (document.getElementById (' Data '), { function() { }, function () { return document.getElementById (' Data '). value; }, function() { }});
JS implementation cut, copy, paste--clipboard.js