-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.html
27 lines (27 loc) · 926 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title></title>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/jquery.zclip.min.js"></script>
<body>
<input type="text" name="text" id="text" value="http://www.baidu.com" />
<a href="javascript:void(0)" id="dynamic">复制</a>
<script type="text/javascript">
$(document).ready(function(){
$("#dynamic").zclip({
path:'ZeroClipboard.swf',
copy:$('#text').val(),
beforeCopy:function(){
//some code
},
afterCopy:function(){
alert($("#text").val());
}
});
//beforeCopy afterCopy 是可选项
});
</script>
</body>
</html>