<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<script language="javascript">
function get(){
if(document.form1[0].checked==true){
var obj1=document.getElementById("text1");
obj1.style.display="block";
var obj2=document.getElementById("text2");
alert(obj2);
obj2.style.display="none";
}
if(document.form1[1].checked==true){
var obj1=document.getElementById("text2");
obj1.style.display="block";
var obj2=document.getElementById("text1");
alert(obj2);
obj2.style.display="none";
}
}
</script>
<body>
<form id="form1" name="form1" method="post" action="">
<table width="380" border="1">
<tr>
<td width="200" rowspan="2"><table width="200" border="1">
<tr>
<td><label>
<input type="radio" name="txt" value="radiobutton" checked="checked" οnclick="get()" />
a</label></td>
</tr>
<tr>
<td><label>
<input type="radio" name="txt" value="radiobutton" οnclick="get()"/>
b</label></td>
</tr>
</table></td>
<td width="164">
<div id="text1">
<table width="200" border="1">
<tr>
<td>a</td>
</tr>
</table>
</div>
<p> </p></td>
</tr>
<tr>
<td>
<div id="text2" style="display:none" >
<table width="200" border="1">
<tr>
<td>v</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</form>
</body>
</html>