Quantcast
Channel: javascript:; vs javascript:void(0); - Stack Overflow
Browsing latest articles
Browse All 4 View Live

Answer by user377136 for javascript:; vs javascript:void(0);

I agree with David that neither should be used. The javascript pseudo-protocol can put the page into a waiting state in some browsers, which can have unexpected consequences. As one example, I spent...

View Article



Answer by Jason McCreary for javascript:; vs javascript:void(0);

Only that the latter javascript:void(0); is more readable and an accepted convention that says this code does nothing.It's worth noting that industry standards have come a long way regarding this...

View Article

Answer by Quentin for javascript:; vs javascript:void(0);

One runs JavaScript that is just an empty statement, the other runs JavaScript that evaluates the statement 0 and then returns undefined.Neither should be used.

View Article

javascript:; vs javascript:void(0);

I would like to know what is the difference between javascript:; and javascript:void(0); if I use them in href attribure for a anchor (link)<a href="javascript:;"...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images