我想访问jquery中嵌套的anchor标记,如下所示。我想在jquery中选择每个锚并为其添加一个单击事件。
<table id="table1">
<tr>
<th>Tags</th>
<th>ID</th>
<th>Batch ID</th>
<th>Source</th>
<th>Date</th>
<th>Details
<div id="detailsdiv">
<a href="#" id="default">Default</a> |
<a href="#" id="wrap">Wrap</a>
</div>
</th>
<th>Account Name</th>
<th>Col15</th>
<th>Col16</th>
<th>Col17</th>
<th>Col18</th>
</tr>
发布于 2013-05-21 19:34:07
试一试
$("#detailsdiv a").click(function() {
// add function And
$(this) // add function for clicked tag
});https://stackoverflow.com/questions/16668894
复制相似问题