使用jquery,我希望在當前錶行的正上方的輸入字段中找到值,例如,如果tr id =「two」處於活動狀態,我可以在tr id =「one」找到輸入id =「x」的值,如果tr id =「three」有效,我可以在tr id =「two」找到輸入id =「y」 ,建議!在活動行上方的表中查找輸入字段的值
<table>
<tr id="one">
<input type="text" id="x"/>
</tr>
<tr id="two">
<input type="text" id="y"/>
</tr>
<tr id="three">
<input type="text" id="z"/>
</tr>
</table>
你是什麼活動行是什麼意思?當您點擊或當您輸入鼠標時,您需要該值?你活躍的條件是什麼! – Narendra