Deprecated: Automatic conversion of false to array is deprecated in /home/u164338858/domains/areyoupop.com/public_html/wp-content/plugins/gs-facebook-comments/public/class-wpfc-public.php on line 258
Occasionally, you may come across an HTML document that includes the use of href="JavaScript:void(0);" within an <a> element. This usage of JavaScript void is often employed when inserting expressions into a web page may result in undesired side-effects.
You can effectively eliminate these negative outcomes as it returns the undefined primitive value.
A frequent use case for JavaScript:void(0) is with hyperlinks. When you need to call JavaScript within a link, clicking the link typically causes the browser to either load a new page or refresh the current page or lost the current scroll position. However, if you have attached some JavaScript to the link, you may not want this behavior to occur.
javascript:
javascript: is a pseudo URL. A way to embed JavaScript code directly into an HTML document. It can be used as the value of a hyperlink’s href attribute or as the value of an event handler such as onclick.
For example, if you have a link that needs to perform a…