兼容所有浏览器的js复制插件Zero使用介绍

时间:2014-03-19    点击:107   
这里需要三个插件,分别是:

jquery.js

ZeroClipboard.js

ZeroClipboard.swf

祝你好运!
复制代码 代码如下:

<meta charset="utf-8" />

<button id="d_clip_button" data-clipboard-target="fe_text" >点击复制</button>
<input id="fe_text" value="Testing text." />

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="ZeroClipboard.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {

ZeroClipboard.setDefaults({
moviePath: "ZeroClipboard.swf"
});

var clip = new ZeroClipboard($("#d_clip_button"));

clip.on("load", function(client) {
console.log("ZeroClipboard.");

client.on("complete", function(client, args) {
console.log("内容己复制 :" + args.text);
});
});
});
</script>
jquery判断小数点两位和自动删除小数两位后的数字
改变隐藏的input中value值的方法
js获取url中的参数且参数为中文时通过js解码
JS 打印界面的CSS居中代码适用所有浏览器
兼容所有浏览器的js复制插件Zero使用介绍
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved