w0lf42
05-21-2004, 06:05 PM
I have always wondered what the difference between, in an anchor tag/element, placing the javascript on the href attribute and creating an onclick attribute.
<a href="javascript:functionName();">click me </a>
versus
<a href="#" onclick="functionName();">click me</a>
Please let me know which way is best.
BTW, I am aware of the space between "java" and "script", but it seems as though the forums added it automatically.
Thanks.
<a href="javascript:functionName();">click me </a>
versus
<a href="#" onclick="functionName();">click me</a>
Please let me know which way is best.
BTW, I am aware of the space between "java" and "script", but it seems as though the forums added it automatically.
Thanks.