案例:jQuery案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript" src="/js/jquery.js"></script>
4
<script type="text/javascript">
5
$(document).ready(function(){
6
  $("p").bind('click dblclick mouseover mouseout',function(event){
7
    $("div").html("事件:" + event.type);
8
  });
9
});
10
</script>
11
</head>
12
13
<body>
14
<p>该段落定义了 click、double-click、mouseover 以及 mouseout 事件。如果您触发了其中的一个事件,下面的 div 中会显示出事件的类型。</p>
15
<div></div>
16
</body>
17
</html>
18