(function(i){ var old=b[i].form.onsubmit; b[i].form.onsubmit=function(){ for(var o=0,t=this;o<t.length;o++){ t[o].value="" }; old() } })(i);