function getEventType(event) { alert(event.type); }
<body onmousedown="getEventType(event)"> <p>在文档中点击某个位置。消息框会提示出被触发的事件的类型。</p> </body>