我有下面的代码片段,我没有访问标记来添加id的/类。删除某些值的复选框
我需要做的是删除任何具有特定值的复选框。有10个左右的值,如果任何复选框有这些值,他们需要从标记中删除。除此之外,我还需要在此复选框输入之前同时删除其相关联的文本“添加”。我将如何定位这些复选框输入和关联的“添加”文本以便删除?
编辑:可以说,值是1234,abcd,efgh,ijkl,54330,ll64等......我需要检查这些和其他值。
<table width="100%"cellpadding="0" cellspacing="0"><tr>
<td valign="top">
<b><FONT class="pricecolorsmall colors_productprice">Sale Price: £4.95 </font></b>
<br /><div class="337">Add</div> <input type="checkbox" name="ProductCode2"
value="480GCFD">
</td>
</tr></table>
</td>
<td valign="top" width="25%">
<table width="100%"cellpadding="0" cellspacing="0"><tr>
<td valign="top">
<b><font class="pricecolorsmall colors_productprice"><font class="smalltext colors_text"><b>Sale Price </b></font> £1.00 </font></b>
<br /><div class="337">Add</div> <input type="checkbox" name="ProductCode2"
value="LL64">
</td>
</tr></table>
</td>
<td valign="top" width="25%">
<table width="100%"cellpadding="0" cellspacing="0"><tr>
<td valign="top">
<b><FONT class="pricecolorsmall colors_productprice">Sale Price: £8.50 </font></b>
<br /><div class="337">Add</div> <input type="checkbox" name="ProductCode2"
value="54330">
</td>
</tr></table>
</td>
<td valign="top" width="25%">
<table width="100%"cellpadding="0" cellspacing="0"><tr>
<td valign="top">
<b><FONT class="pricecolorsmall colors_productprice">Sale Price: £4.95 </font></b>
<br /><div class="337">Add</div> <input type="checkbox" name="ProductCode2"
value="460GCRS">
</td>
</tr></table>
这正是我一直在寻找和完美运作。知道我可以使用一个数组,而不是10个单独的行来删除只是不知道该怎么做,不知道如何定位以前的div。今天学了一个新的Jquery术语,“.end()必须看起来那个,THX – user357034 2010-09-09 00:27:11
@user - 不客气,很高兴它工作。:o) – user113716 2010-09-09 00:28:59