I have a form with 3 input box and all the input box does not have id, name field in it. So if i enter value in it, How can i check the value of input box without id and nam
var inpObj = document.getElementsByTagName('input'); for(var i in inpObj){ if(inpObj[i].type == "text"){ alert(inpObj[i].value); } }
This code will alert all the input textfields.