$("div > input").length或者 你给这个div一个id ,然后document.getElementById("div_id").getElementsByTagName("input").length