How to make an anchor tag refer to nothing?

JavascriptWeb DevelopmentFront End Technology

To make an anchor tag refer to nothing, use “javascript: void(0)”. The following link does nothing because the expression "0" has no effect in JavaScript. Here the expression "0" is evaluated, but it is not loaded back into the current document.


Live Demo

      <p>Click the following, This won't react at all...</p>
      <a href="javascript:void(0)">Click me!</a>
Published on 03-Feb-2018 09:48:58