0
<tr id="autogeneratedrowid_gridrow1">
<td>1</td>
<td>2</td>
<td>
<table id="unitprice">
<tbody>
<tr>
<td>
<A class=link2 id="aurogenerated" onclick="setMode(this); return false;">Edit</A>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr id="autogeneratedrowid_gridrow2">
.....
.....
</tr>
這是我當我點擊鏈接按鈕setMode功能呈現的HTML代碼被稱爲& I M過客「這」指的鏈接按鈕,我想找到gridrow當鏈接按鈕是點擊使用jQuery功能? 我用這如何從單元格內容中找到行點擊?
$("#" + lnkBtn.id).parent().parent().parent().parent().parent().parent();
但這不是做
但我的ID是autogeneated我怎麼能添加一個類呢? thanx – Tuscan 2011-05-04 05:57:30
id無所謂,它會保持原樣。你必須添加'tr' a ** class **屬性的值'rowclass',所以你有'
可以使用closeset
http://api.jquery.com/closest/
來源
2011-05-04 05:48:50 kobe
這將在第七行找到tr的代碼(錯誤) – 2011-05-04 06:59:01
來源
2011-05-04 05:51:07
這個代碼將會給該行的索引,希望這會幫助你。
來源
2011-05-04 05:54:56 suren
相關問題