<form id="foo">
<input></input>
<input></input>
<input></input>
</form>
我想做的事:選擇元素從列表中通過指數與jQuery
document.getElementById("foo").getElementsByTag("input")[1];
但在jQuery的。我想通過索引選擇#foo下的某個對象。
這是我第一次的猜測,如何做到這一點:
$('#foo input[1]').val("BlahBlah");
我認爲這將是在CSS一樣了。