| Href attribute for JavaScript links: "#" or "javascript:void(0)"? [message #1057728] |
Wed, 08 May 2013 09:26  |
Hi-Tech ITO Messages: 2 Registered: May 2013 Location: Ahmedabad |
Junior Member |
|
|
When building a link that has the sole purpose to run JavaScript code, there are 2 ways to write the code. Which is better, in terms of functionality, page load speed, validation purposes, etc?
<a href="#" onclick="myJsFunc();">Run JavaScript Code</a>
or
<a href="javascript:void(0)" onclick="myJsFunc();">Run JavaScript Code</a>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02255 seconds