源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

JS+flash实现chrome和ie浏览器下同时可以复制粘贴

  • 时间:2020-12-06 03:12 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:JS+flash实现chrome和ie浏览器下同时可以复制粘贴
利用2个文件 ZeroClipboard.js ZeroClipboard.swf
[u]复制代码[/u] 代码如下:
<script type="text/javascript" src="ZeroClipboard.js"></script> <script language="JavaScript"> var clip = null; function $(id) { return document.getElementById(id); } function init(xm) { clip = new ZeroClipboard.Client(); clip.setHandCursor( true ); clip.addEventListener('load', function (client) { debugstr("Flash movie loaded and ready."); }); clip.addEventListener('mouseOver', function (client) { // update the text on mouse over clip.setText($('txt_links').value ); }); clip.addEventListener('complete', function (client, text) { debugstr(xm ); }); clip.glue( 'd_clip_button', 'd_clip_container' ); } function debugstr(msg) { if(msg=='1'){ alert('复制成功,请用Chrl+V粘贴'); //alert('chushihu,请用Chrl+V粘贴'); }else{ } } </script>
注意:<body onload="init(1);">
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部