在网页中加入以下代码:
复制内容到剪贴板
代码:
<script type="text/javascript">
document.body.oncopy = function () {
setTimeout( function () {
var text = clipboardData.getData("text");
if (text) {
text = text + "\r本文来自西部教育网(http://www.ww51.com) 详细出处请参考:"+location.href; clipboardData.setData("text", text);
}
}, 100 )
}
</script>