<textarea id="runcode3138"><input type= "button" Name= "Submit" onclick= ' CopyToClipboard () ' value= ' Copy the address of this page and pass it to the friend on Qq/msn "width=" 100 " height= > <script language= "javascript" > Function CopyToClipboard () {var clipboardcontent= ""; Clipboardcontent+=document.title; clipboardcontent+= ""; Clipboardcontent+=this.location.href; Window.clipboardData.setData ("Text", clipboardcontent); Alert ("Copy successful, paste on your qq/msn to recommend to your friends"); } </script> <script> document.body.oncopy = function () {settimeout (function () {var text = Clipboarddata . GetData ("text"); if (text) {text = text + \ r \ n This article comes from the "cloud Habitat community" Reproduced please indicate the source URL in the form of link: "+location.href clipboarddata.setdata (" text ", text);}, 1 )} </script></textarea>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]