Which is the best “non-active” href attribute?
April 12, 2011
No Comments
Tags: href html javascript
I forget these code snippet frequently, I hope you you like it.
If you create some event for your link element and the “href” attribute need to be ignored the following values are used very often:
- href=”#” – This one is used on most of the sites. It’s very east to use but will change your URL in the browser
- href=”javsacript:;” – Actually you can “JavaScript” to do nothing (bad solution)
- href=”javascript:void(0);” – This is the one your should use!
No related posts.





