是否可以在不传递任何事件参数的情况下从调用的 JavaScript 函数获取 JavaScript 触发事件?
这是示例代码:
<html>
<head>
<script>
function myFunction()
{
// How I will get from here the fired event ??
}
</script>
</head>
<body>
<p id="paragraghhh" onclick="myFunction()">
Click on this paragraph. An alert box will
show which element triggered the event.
</p>
</body>
</html>