直接使用JS的execCommand()方法。
var e = document.getElementById("id");
e.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令
直接使用JS的execCommand()方法。
var e = document.getElementById("id");
e.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令