案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function getEventType(event)
5
  { 
6
  alert(event.type);
7
  }
8
</script>
9
</head>
10
11
<body onmousedown="getEventType(event)">
12
13
<p>在文档中点击某个位置。消息框会提示出被触发的事件的类型。</p>
14
15
</body>
16
</html>
17