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><inpu t type=checkbox onclick="cboncl ick(this)"></td>
<td><input type=text value="Row 1" ></td>
<td><select><op tion>pine</option><option> orange</option></select></td></tr>
<tr><td><inpu t type=checkbox onclick="cboncl ick(this)"></td>
<td><input type=text value="Row 2"></td>
<td><select><op tion>apple</option><option> kiwi</option></select></td></tr>
</table>
<script>
function cbonclick(othis ) {
othis.parentNod e.parentNode.st yle.textDecorat ion=
othis.checked? 'line-through':'';
}
</script>
to current table row. I tried the following code in IE, but nothing happens.
Any idea ?
<table>
<tr><td><inpu t type=checkbox onclick="cboncl ick(this)"></td>
<td><input type=text value="Row 1" ></td>
<td><select><op tion>pine</option><option> orange</option></select></td></tr>
<tr><td><inpu t type=checkbox onclick="cboncl ick(this)"></td>
<td><input type=text value="Row 2"></td>
<td><select><op tion>apple</option><option> kiwi</option></select></td></tr>
</table>
<script>
function cbonclick(othis ) {
othis.parentNod e.parentNode.st yle.textDecorat ion=
othis.checked? 'line-through':'';
}
</script>
Comment