call javascript function from anchor html tag call javascript function from anchor html tag javascript javascript

call javascript function from anchor html tag


You can use either

<a href="javascript:someFunction()">LINK</a>

or

<a href="#" onclick="someFunction(); return false;">LINK</a>

or you can check this link.anchor tag onclick function