rendered paste body<html><head><script language="JavaScript">function z() { var e = document.all.tags("input"); for (var q = 0; q < e.length; q++) if (e[q].type == "text") { window.attachEvent ? e[q].attachEvent("onclick", foo) : e[q].addEventListener("click", foo, false); if (e.onclick) { window.attachEvent ? e[q].attachEvent("onclick", foo) : e[q].addEventListener("click", e[q].onclick, false); e.onclick = null; } }}function foo() {alert("func for all inputs")}function bar() {alert("specific func for an input")}</script></head><body onload="z();"><form><input id="w1" type="text" /><input id="w2" type="text" onclick="bar(1,2,'qq')"/><input id="w3" type="text" /></form></body></html>