我想獲取位於單個類名稱中的所有字段..例如我的代碼。獲取位於特定類別中的所有文本字段值
<div class="test">
<input type="text" class="text-field" />
<input type="text" class="text-field" />
<input type="text" class="text-field" />
<input type="text" class="text-field" />
</div>
<div class="test">
<input type="text" class="text-field" />
<input type="text" class="text-field" />
<input type="text" class="text-field" />
<input type="text" class="text-field" />
</div>
我想要得到的each loop
在它返回我,就設在這個類中的文本字段值.. 任何建議.. (我在jQuery的是新)
我想要每個文本字段的所有值。 – chhameed
爲你做了編輯 –
如果有人想要得到非輸入元素的價值,請使用'.html()'而不是'.val()' – blackandorangecat