Cannot read property 'preventDefault' of undefined in javascript error
<p>In Console I got following error using e.preventDefault() method
I used e as a function parameter </p>

<pre><code>  function function1(e){
     e.preventDefault();
   } 
</code></pre>

<p>1533 Uncaught TypeError: Cannot read property 'preventDefault' of undefined.</p>

<p>Called function1 like </p>

<pre><code>    &lt;a href="#none" onclick="function1()"&gt;Click Me&lt;/a&gt; 
</code></pre>