<div class="htmlarea"> <textarea id="runcode63796"> <input type="button" name="Submit" onclick="copyToClipBoard()" value="复制本页文章地址,传给QQ/MSN上的好友" width="100" height="16"> <script language="javascript"> function copyToClipBoard(){ var clipBoardContent=""; clipBoardContent+=document.title; clipBoardContent+=""; clipBoardContent+=this.location.href; window.clipboardData.setData("Text",clipBoardContent); alert("复制成功,请粘贴到您的QQ/MSN上推荐给您的好友"); } </script> <script> document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = text + "\r\n本篇文章来源于 "脚本之家" 转载请以链接形式注明出处 网址:"+location.href; clipboardData.setData("text", text); } }, 100 ) } </script> </textarea><br><input onclick="runEx('runcode63796')" type="button" value="运行代码"> <input onclick="doCopy('runcode63796')" type="button" value="复制代码"> <input onclick="doSave(runcode63796)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div>