Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
と<div id="inputform">がdiv複数あります<input type="text">。<input>フィールドの数を数えるにはどうすればよいですか?
<div id="inputform">
div
<input type="text">
<input>
var inputFormDiv = document.getElementById('inputForm'); alert(inputFormDiv.getElementsByTagName('input').length);
$('#inputform input[type="text"]').length;