Here is the snippet.
$("input").mousedown(function(e){ alert(e.which) });
I need it to be 'normal javascript', something like this:
document.getElementsByTagName('input').onmousedown = function(e){ alert(e.which); };
How would I get this accomplished?
Note:
I CANNOT add an onmousedown attribute to the input element.
Thanks :)