Is there any reason to use one of the following more than the others:
<input type="button" value="b1" onclick="manageClick(this)" />
<input type="button" value="b2" onclick="manageClick(this);" />
<input type="button" value="b2" onclick="manageClick(this);return false;" />
<input type="button" value="b3" onclick="return manageClick(this);" />
<input type="button" value="b4" onclick="javascript:return manageClick(this);" />
And please do not spend your valuable time to tell me to use jQuery or attachEvent/addEventListener. It's not really the objective of my question.
input.onclick= manageClick;and havemanageClicklook atthis? It's the simpler form ofattachEvent/addEventListenerfor when you don't need multiple listeners.type="button"thereturn true/falseisn't useful as there's no default action to allow/cancel anyway. For a link or submit it can be. But yeah, inline event handlers are generally to be avoided (in every case except one where occasionally you might need it:img onloadon static images), andjavascript:is very much wrong, a sign the author doesn't know what they're doing.