标签:
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>javascript-复制到内存</title>
</head>
<body>
<p id="p">世界那么大,我想去看看</p>
<button id="copy">复制</button>
<input id="in" type="text">
<script src="jquery.min.js"></script>
<script src="jquery.zclip.min.js"></script>
<script>
$(function () {
$("#copy").zclip({
path: ‘ZeroClipboard.swf‘,
copy: $("#p").text(),
beforeCopy: function () {
// Do something before Copy
},
afterCopy: function () {
// Do something after Copy
}
});
});
</script>
</body>
</html>
必须在服务器环境下运行。
标签:
原文地址:http://blog.csdn.net/wozaixiaoximen/article/details/45798951