Monday, December 31, 2018

html - Which "href" value should I use for JavaScript links, "#" or "javascript:void(0)"?

The following are two methods of building a link that has the sole purpose of running JavaScript code. Which is better, in terms of functionality, page load speed, validation purposes, etc.?





function myJsFunc() {
alert("myJsFunc");
}

Run JavaScript Code





or





function myJsFunc() {
alert("myJsFunc");
}

 Run JavaScript Code


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...