我想知道如何編寫一個jQuery選擇器來選擇下面的每個「輸入」項目。我不想一次選擇它們。這些輸入框不會有名稱或ID。我可能必須使用某種兒童符號,但我不知道如何去做。如何使用jQuery選擇器來定位這些元素?
<div id="partdiv">
<div class="floater">
<input type="text"/> // Some input box with no id or name
</div>
<div id="descriptiondiv">
<div class="floater">
<input type="text"/> // Some input box with no id or name
</div>
<div id="positiondiv">
<div class="floater">
<input type="text"/> // Some input box with no id or name
</div>
</div>
</div>
</div>
對於第一個,比如,我想:
$("#partdiv > input").bind(....
,但沒有奏效。
你打算跟他們做什麼? – roselan