我有相同的ID 2輸入踏歌但我想取回第一輸入標籤值1我能做些什麼..像下面如何在輸入標籤中檢索具有相同ID的值?
<td>
<input id="monetaryvalue_new0" class="monetaryvalue_new smallInputBox" type="text" value="1" name="monetaryvalue_new0" rownumber="0" readonly="">
</td>
<td>
<input id="monetaryvalue_new0" class="monetaryvalue_new smallInputBox" type="text" value="0" name="monetaryvalue_new0" rownumber="0" readonly="">
</td>
不能使用重複'id',因爲您必須通過'class'訪問 –
可能重複您的問題。請檢查http://stackoverflow.com/questions/34692934/hide-only-one-div-to-same-id –
遐我知道路徑,但我不知道如何自動生成相同的ID –