This article mainly introduces the JS in Chrome and IE under the implementation of replication, the need for friends can refer to the
IE JS Code: Code as follows: <script type= "Text/javascript" > Function CopyUrl2 () {var Url2=document.getelementbyid ("Biao1"); Url2.select (); Select Object Document.execcommand ("Copy"); The Execute Browser Copy command alert ("has been copied well, can be pasted.") "); } </script> <textarea cols= "rows=" id= "Biao1" > user-defined code area </textarea> <input type= "button" on Click= "CopyUrl2 ()" value= "click Copy Code"/> Chrome JS Code: The code is as follows: <script src= "http://www.weicaiyun.com/assets/js/copy/Ze Roclipboard.js "></script> <script type=" Text/javascript "> var clip = new Zeroclipboard.client (); Clip.sethandcursor (TRUE); Clip.settext (' copy content '); Clip.glue (' button '); </script> <input type= "button" id= "button" value= "click Copy Code"/>