I would like to keep my JavaScript and HTML code separate. To do this, I want to make sure that I never use the following syntax:
<input type="text" name="text" onClick="javascript:onClick(this)" />
But I want to hook into the onClick event for example the above input but without having to use the onClick property within it's HTML. Furthermore, I would like to keep it implementation agnostic, using raw JavaScript and not the frameworks like jQuery or MooTools (Although, if you wish to provide those as illustrations along with the raw JavaScript that would be good too).
<input type="text" name="text" />