我對此有一個問題,我想通過選中與選擇元素對應的複選框來啓用select元素。我怎樣才能做到這一點?使用javascript找到下一個特定元素?
<table>
<?php do { ?>
<tr>
<td><input type="checkbox" /></td>
<td>
<select disabled="disabled">
<option value="1">Dog</option>
<option value="2">Cat</option>
</select>
</td>
</tr>
<?php } while($row = mysql_fetch_assoc($result)); ?>
</table>
雖然我不喜歡使用事件屬性,但它還不錯,乾淨的回答。 – Christoph 2012-07-25 07:28:48