bind()、toggle()和hover()
点击依次执行,第一个事件,第二个事件
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body>
<input type="button" id="btn" value="触发" />
<script src="jQuery Core 1.9.1.js"></script>
<script>
$("#btn").bind("click",function(){
alert("第一个事件");
alert("第二个事件");
})
</script>
</body>
</html>
同上
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body>
<input type="button" id="btn" value="触发" />
<script src="jQuery Core 1.9.1.js"></script>
<script>
$("#btn").bind("click",function(){
alert("第一个事件");
}).bind("click",function(){
alert("第二个事件");
})
</script>
</body>
</html>``
`“