Talk:JavaScript/Best Practices

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

Recently[1] someone changed an example from

 <a href="resumePlainVersion.html" onclick="return !resumeFancyVersion()">See my résumé!</a>

to

 <a href="#" onclick="resumeFancyVersion()">See my résumé!</a>

. I certainly don't deny that many web pages do, in fact, use that second form. However, I'm reverting back to the first form. Mainly because Matt Kruse specifically lists it[2] as an example of "What Not To Do": "Often, links will just contain href="#" ... This practice is discouraged."

I don't know of any good reason to use that second form. But since many web pages use it, I suppose it is possible there is such a good reason -- please tell me what it is. --DavidCary (talk) 04:42, 19 November 2008 (UTC)