<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Test</title>
<script language="javascript">
<!--
function changeItem(i)
{
var k = 3;
for(var j = 0;j < k;j++){
if(j == i){
document.getElementsByTagName("Div")[j].style.display = "block";
}
else{
document.getElementsByTagName("Div")[j].style.display = "none";
}
}
}
-->
</script>
</head>
<body>
<p>
<input name="ctype" type="radio" value="1" checked onClick="return changeItem(0);">
单选一
<input type="radio" name="ctype" value="2" onClick="return changeItem(1);">
单选二
<input type="radio" name="ctype" value="3" onClick="return changeItem(2);">
单选三
<br>
<div id="Div0" style="display: block;">您选择了第一项</div>
<div id="Div1" style="display: none;">您选择了第二项</div>
<div id="Div2" style="display: none;">您选择了第三项</div>
</p>
</body>
</html>