<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html;charset=gb2312" >
<title> Web effects based on a text box changed by a radio box </title>
<script language= "JavaScript" >
<!--
function Changeitem (i)
{
var k = 2;
for (var j = 0;j < k;j++) {
if (j = = i) {
document.all["Div" + j].style.display = "block";
}
else{
document.all["Div" + J].style.display = "none";
}
}
}
</script>
<body>
<input type= "Radio" name= "Region" value= "1" checked onclick= "return Changeitem (0);" > Single-choice 1
<input type= "Radio" name= "Region" value= "2" onclick= "return Changeitem (1);" > Radio 2<br>
<div id= "Div0" style= "Display:block;" >item1:<input type= "text" name= "TextField" ></div>
<div id= "Div1" style= "Display:none;" >item2:<input type= "text" name= "Textfield2" ></div>
</body>
text box changed according to the Radio box