target、srcElement和window.event
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
<script type="text/javascript">
function onClickMe(oEvent){
console.log("window.event.type is " + window.event.type);
console.log("arguments.callee.caller.arguments[0] is " + arguments.callee.caller.arguments[0].type); //或者arguments[0].type
console.log("oEvent.target is " + oEvent.target.style.width);
console.log("oEvent.target is " + oEvent.target.tagName);
console.log("oEvent.srcElement is " + oEvent.srcElement.innerHTML);
}
</script>
</head>
<body>
<div style="background:red;width:100px;height:30px;" onclick="onClickMe(event);">Click Me!</div>
</body>
</html>

浙公网安备 33010602011771号