Сообщение от vatar
|
А так - не работает.
|
У меня в ИЕ8 работает...
<!DOCTYPE html>
<html>
<head>
<!--
<script src="http://code.jquery.com/jquery-latest.js"></script>
-->
<style type="text/css">
.inv {
display: none;
}
</style>
<script type="text/javascript">
var old_tr_id = 'r0';
function src_select(new_tr_id) {
if (new_tr_id != 'r0') {
document.getElementById(new_tr_id).style.display = "table-row";
alert('показал '+new_tr_id)
}
if (old_tr_id != 'r0') {
document.getElementById(old_tr_id).style.display = "none";
alert('спрятал '+old_tr_id)
}
old_tr_id = new_tr_id;
}
</script>
</head>
<body>
<table>
<tr>
<td>Radio</td>
<td>
<input type=radio name=rb value='r1' onclick="src_select(this.value)">1
<input type=radio name=rb value='r2' onclick="src_select(this.value)">2
<input type=radio name=rb value='r3' onclick="src_select(this.value)">3
<input type=radio name=rb value='r0' onclick="src_select(this.value)" checked>0
</td>
</tr>
<tr id=r1 class=inv><td>1</td></tr>
<tr id=r2 class=inv><td>2</td></tr>
<tr id=r3 class=inv><td>3</td></tr>
</table>
</body>
</html>
</body>
</html>