DHTML locating an element with no ID
Posted: Wed Apr 25, 2012 9:01 am
The HTML looks like this:
The first <tr> ....</tr> I can give it an ID. But the followings, cannot. Because it is generated by some PHP functions,
which is out of my control. Is there anyway to say " I want to select the second <tr> element after ID=pn2 " or something similar?
Code: Select all
<tr>
<td class="main"></td>
<td class="main" [color=#FF4080]id=pn2[/color]><img src="/catalog/includes/languages/tchinese/images/icon.gif" border="0" alt="Chinese" title="Chinese"> <input type="text" name="products_name[3]" /></td>
</tr>
<tr bgcolor="#ebebff">
<td></td>
<th class="main">If any of the following extra fields do not apply to this product leave them blank if it is a text or checkbox field or set to “Does Not Apply” if it is a drop down list or radio button field.</th>
</tr>
<tr bgcolor="#ebebff" >
<td class="main">author:</td>
<td class="main"><img src="/catalog/includes/languages/english/images/icon.gif" border="0" alt="English" title="English"> <input type="text" name="extra_value2_1" maxlength=100 size=100 /></td>
</tr>
<tr bgcolor="#ebebff" >
<td class="main">auteur:</td>
<td class="main"><img src="/catalog/includes/languages/french/images/icon.gif" border="0" alt="French" title="French"> <input type="text" name="extra_value2_2" maxlength=100 size=100 /></td>
</tr>
which is out of my control. Is there anyway to say " I want to select the second <tr> element after ID=pn2 " or something similar?