Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
HTML
href="javascript:func()" vs href="#" onclick="javascript:func()"
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Dan, post: 1605998"] [top-posting snipped -- [URL]http://mailformat.dan.info/quoting/[/URL] ] In many (most?) cases, the JavaScript link is there to bring up some content in some fancy way (like in a popup box), so it would make sense to have a valid link URL as a graceful degradation in the case of non-JavaScript-enabled users. Your function can end with "return false;" in order to suppress the normal link, so it won't do something annoying like jump around in the page when JavaScript is enabled. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
HTML
href="javascript:func()" vs href="#" onclick="javascript:func()"
Top