版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/csdnlinyongsheng/article/details/83621653
onclick自带event事件,代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<button onclick="btnFunc()"></button>
<script>
function btnFunc()
{
var e = window.event || arguments.callee.caller.arguments[0];
console.log(e);
}
</script>
</body>
</html>