JavaScript Empty link

From JumbaWiki

Jump to: navigation, search

There can sometimes be a reason to have a link but not have it go anywhere because the link runs JavaScript. This is how you create a simple link that does "nothing" or at least doesn't load a page.

Code

   <a href="javascript:;">Do nothing</a>
 
   <a href="javascript:void(0);">Do nothing</a>

See also

Personal tools
Australian Photography | Unique Views of Reality | Daedalus | Pet Forums