创建一个id
为basic_wxh
的HTML
盒子
在时间里边调用该函数copyArticle
function copyArticle() {
var range = document.createRange();
range.selectNode(document.getElementById('basic_wxh'));
var selection = window.getSelection();
if (selection.rangeCount > 0) selection.removeAllRanges();
selection.addRange(range);
document.execCommand('copy');
}