复制网页内容,粘贴之后自动加上网址的实现方法

  作者:bea

<script type="text/javascript">document.body.oncopy = function () {setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + ""+location.href; clipboardData.setData(&qu

<script type="text/javascript">

document.body.oncopy = function () { 

 setTimeout( function () { 

  var text = clipboardData.getData("text");

  if (text) { 

   text = text + "
"+location.href; clipboardData.setData("text", text);

  } 

    }, 100 ) 

}

</script>


有用  |  无用

猜你喜欢

您可能感兴趣的文章: