Zero Clipboard to copy the browser to the Clipboard (multiple copy buttons), zeroclipboard
This article describes how to copy a browser to the Clipboard Using Zero Clipboard. We will share this with you for your reference. The details are as follows:
<Script type = "text/javascript" src = "{$ site_url}/Public/js/ZeroClipboard. js "> </script> <script language =" JavaScript "> $ (function () {$ (". my_clip_button "). each (function (I) {var id = $ (this ). attr ('data'); var clip = null; clip = new ZeroClipboard. client (); ZeroClipboard. setMoviePath ("{$ site_url}/Public/js/ZeroClipboard.swf"); // you can set clip only in the root directory of the website. setHandCursor (true); clip. setText ($ ("# txtInvite _" + id ). val (); clip. addEventListener ('complete', function (client, text) {ui. success ("Congratulations on successful replication") ;}); clip. glue ('d _ clip_button _ '+ id, 'd _ clip_container _' + id) ;}) ;}</script> <style>. my_clip_button {width: 62px; text-align: center; height: 20px; border: 1px solid black; background-color: # ccc; margin: 2px; padding: 2px; cursor: default; font-size: 9pt ;}. my_clip_button.hover {background-color: # eee ;}. my_clip_button.active {background-color: # aaa ;}</style> <div style = "width: 90%; margin: 0 auto; height: 50px; line-height: 20px; "> <table width =" 100% "border =" 0 "cellspacing =" 0 "cellpadding =" 0 "> <tr> <td width =" 19% "height =" 45" align = "right"> default invitation link: </td> <td width = "52%"> <input type = "text" name = "txtInvite_default" id = "txtInvite_default" value = "{$ defaultInviteLink}" style =" width: 350px; "/> </td> <td width =" 31% "> <div id =" d_clip_container_default "style =" position: relative; "> <div id =" d_clip_button_default "class =" my_clip_button "data =" default "> copy </div> </td> </tr> </table> </div> <volist name = "invitelists" id = "vo"> <div style = "width: 90%; margin: 0 auto; height: 50px; line-height: 20px; "> <table width =" 100% "border =" 0 "cellspacing =" 0 "cellpadding =" 0 "> <tr> <td width =" 19% "height =" 45" align = "right"> {$ vo. private invitation link for group_name}: </td> <td width = "52%"> <input type = "text" name = "txtInvite _ {$ vo. id} "id =" txtInvite _ {$ vo. id} "value =" {$ vo. invitelink} "style =" width: 350px; "/> </td> <td width =" 31% "> <div id =" d_clip_container _ {$ vo. id} "style =" position: relative; "> <div id =" d_clip_button _ {$ vo. id} "class =" my_clip_button "data =" {$ vo. id} "> copy </div> </td> </tr> </table> </div> </volist>