Zero Clipboard to copy the browser to the Clipboard (multiple copy buttons), zeroclipboard

Source: Internet
Author: User

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.