A
Andrus
I want that if user clicks in a checkbox, the strike-through effect applices
to current table row. I tried the following code in IE, but nothing happens.
Any idea ?
<table>
<tr><td><input type=checkbox onclick="cbonclick(this)"></td>
<td><input type=text value="Row 1" ></td>
<td><select><option>pine</option><option>orange</option></select></td></tr>
<tr><td><input type=checkbox onclick="cbonclick(this)"></td>
<td><input type=text value="Row 2"></td>
<td><select><option>apple</option><option>kiwi</option></select></td></tr>
</table>
<script>
function cbonclick(othis) {
othis.parentNode.parentNode.style.textDecoration=
othis.checked? 'line-through':'';
}
</script>
to current table row. I tried the following code in IE, but nothing happens.
Any idea ?
<table>
<tr><td><input type=checkbox onclick="cbonclick(this)"></td>
<td><input type=text value="Row 1" ></td>
<td><select><option>pine</option><option>orange</option></select></td></tr>
<tr><td><input type=checkbox onclick="cbonclick(this)"></td>
<td><input type=text value="Row 2"></td>
<td><select><option>apple</option><option>kiwi</option></select></td></tr>
</table>
<script>
function cbonclick(othis) {
othis.parentNode.parentNode.style.textDecoration=
othis.checked? 'line-through':'';
}
</script>