prevent default event in onclick
<p>How to prevent default in onclick method. I have a method in which I am also passing a custom value</p>

<pre><code>&lt;a href="#" onclick="callmymethod(24)"&gt;Call&lt;/a&gt;

function callmymethod(myVal){
    //doing custom things with myVal
    //here I want to prevent default
}
</code></pre>
