在Console中我使用e.preventDefault()方法得到以下错误我使用e作为函数参数
function function1(e){
e.preventDefault();
}
Run Code Online (Sandbox Code Playgroud)
1533 Uncaught TypeError:无法读取未定义的属性'preventDefault'.
叫做function1就像
<a href="#none" onclick="function1()">Click Me</a>
Run Code Online (Sandbox Code Playgroud)