About 157,000 results
Open links in new tab
  1. What does "javascript:void (0)" mean? - Stack Overflow

    Aug 18, 2009 · Usage of javascript:void(0) means that the author of the HTML is misusing the anchor element in place of the button element. Anchor tags are often abused with the onclick event to create …

  2. void operator - JavaScript - MDN

    Jul 8, 2025 · The void operator is often used merely to obtain the undefined primitive value, usually using void(0) (which is equivalent to void 0). In these cases, the global variable undefined can be used.

  3. What Does javascript:void(0) Mean? - GeeksforGeeks

    Jul 12, 2025 · javascript:void (0) is commonly used in HTML to create a link that doesn’t perform any action or navigate to a new page. When placed in the href attribute of an <a> tag, it allows the link to …

  4. JavaScript void Operator - W3Schools

    javascript:void (0) is an expression commonly found in HTML, particularly within <a> tags. It serves to prevent the default action of a link, which is to navigate to a new page or reload the current one. The …

  5. What does "javascript:void (0)" mean? (Explained) - Hackr

    Jun 24, 2025 · Let's talk about what void (0) does in JavaScript, where and why it appears in code, and how to replace or fix it depending on your use case. I'll also answer a few of the most common …

  6. JavaScript Void 0 – What Does javascript:void (0); Mean?

    Oct 27, 2020 · With void, it tells the browser not to return anything (or return undefined). Another use case of links with the javascript:void(0) reference is that sometimes, a link may run some JavaScript …

  7. What is JavaScript Void 0? A Complete Guide Explained ... - Simplilearn

    Jan 25, 2025 · When you use JavaScript void 0, it will return an undefined primitive value. This will prevent the browser from opening a new or reloading the web page and allowing you to call the …

  8. What Does JavaScript Void (0) Mean? - Quackit Tutorials

    JavaScript void 0 prevents the browser from loading a new page (or refreshing the current page).

  9. What Does JavaScript:Void (0) Mean? An In-Depth Reference

    Sep 8, 2024 · But with javascript:void(0), instead of navigating or reloading, the browser will run any JavaScript event handlers defined on that link. This technique keeps the page static while …

  10. How to Use JavaScript: void(0) and onClick? - GeeksforGeeks

    Nov 12, 2024 · javascript:void(0) is an expression that evaluates to undefined and effectively does nothing. It is used to prevent the default action of the link (<a> element) when clicked.