JavaScript Void(0) in HTML document

Posted by
August 24, 2018

You can use withinhref="JavaScript:Void(0);"  <a> the element in HTML Document.

We can commonly use this within hyperlinks.

Here are the benefits of using this is, to eliminate the unwanted side-effect, because it will return the undefined primative value.

To prevent the page from refreshing, you could use JavaScript:void(0)

read more