javascript:void(0) or onclick="return false" for - which is better
https://stackoverflow.com/questions/3465750/javascriptvoid0-or-onclick-return-false-for-a-which-is-better
WEBAug 12, 2010 · The way to do it: function myFunction(...) { ... document.getElementById('myLink').addEventListener('click', myFunction, false); In general, it is a second way - event listener. I have written onclick="..." for simplicity. I use JQuery - so $ ("#elementId").bind ("click", function () {return false;}); Thank you.
DA: 14 PA: 49 MOZ Rank: 77