日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > HTML >内容正文

HTML

Zclip-jquery插件支持全浏览器复制

發布時間:2024/4/17 HTML 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Zclip-jquery插件支持全浏览器复制 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.Zclip-jquery插件需要瀏覽器支持flash10及以上,現在的瀏覽器基本都支持

2.http://www.steamdev.com/zclip/下載相關組件:

query.zclip.min.js

ZeroClipboard.swf

去網上找個jquery框架:jquery.min.js

代碼實現:

<html> <meta charset="UTF-8"> <style> a:active, a:hover { outline:0 } a { text-decoration:none; outline:0 } .clr { clear:both; height:0; } a.react { display:block; color:inherit; height:100%; text-decoration:none; } a.react:active, a.react.react-active { background:rgba(0, 0, 0, .1) } .fuzhi { width:60px; height:30px; line-height:30px; background:#fa870b; cursor:pointer; color:#fff; display:block; text-align:center; font-size:.75em; outline:0; float:left; } .fz2 { margin:0 auto; -webkit-border-radius:2px;-moz-border-radius:2px; border-radius:2px; } </style> <script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="jquery.zclip.min.js"></script> <script type="text/javascript">$(function(){$('#copy').zclip({ path: 'ZeroClipboard.swf' ,//copy: $('#qh').text(), //復制div,<span>,<p>等標簽的內容 copy: function(){ return $('#qh').val() //復制input,textarea等內容 },afterCopy: function(){$('#copy').html('復制成功')//復制成功,可以省略 } });}); </script> <body> <textarea style="width:250;height:200" id="qh">zClip is a lightweight jQuery "copy to clipboard" plugin built using the popular Zero Clipboard library. This plugin uses an invisible Adobe Flash movie that is fully compatible with Flash Player 10 and below.</textarea><br /> <!--</span id ="qh">zClip is a lightweight jQuery "copy to clipboard" plugin built using the popular Zero Clipboard library. This plugin uses an invisible Adobe Flash movie that is fully compatible with Flash Player 10 and below. </span><br />--> <a href="javascript:void(0);" class="fuzhi fz2" id="copy" >&nbsp;</a> </body> </html>

?

轉載于:https://www.cnblogs.com/ItcastZc/p/4073032.html

總結

以上是生活随笔為你收集整理的Zclip-jquery插件支持全浏览器复制的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。