var inputs=document.getElementsByName('Submit'); for(var i=0;i