I have a <div id="inputform">
and in that div
there are multiple <input type="text">
.
How can I count the number of <input>
fields?
var inputFormDiv = document.getElementById('inputForm');
alert(inputFormDiv.getElementsByTagName('input').length);