href javascript call

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
WaldoMonster
Forum Contributor
Posts: 225
Joined: Mon Apr 19, 2004 6:19 pm
Contact:

href javascript call

Post by WaldoMonster »

href javascript call

What are the advantages and disadvantages of these href javascript calls?
<a href="javascript:example()">test</a>
<a href="#" onClick="example()">test</a>
<a href="javascript:void(0)" onClick="example()">test</a>
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: href javascript call

Post by Christopher »

They are just different ways to get around not having the link submit.
(#10850)
Post Reply