<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!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=utf-8" />
<title>无标题文档</title>


</head>


<body>
<form id="save" name="save" method="post" action="">
<select id="jshf" name="jshf" οnchange="stChange(this.id);">
<option value="a">a</option>
<option value="b">b</option>
<option value="c">c</option>
</select><br />
<input type="radio" id="r1"  name="r1" value="重庆" οnclick="getValue(this.name);"/>重庆
<input type="radio" id="r1"  name="r1" value="衡水" οnclick="getValue(this.name);"/>衡水
<input type="radio" id="r1"  name="r1" value="永川" οnclick="getValue(this.name);"/>永川<br />
<input type="radio" id="r2"  name="r2" value="中国" οnclick="getValue(this.name);"/>中国
<input type="radio" id="r2"  name="r2" value="美国" οnclick="getValue(this.name);"/>美国<br />
<textarea id="bz" name="bz" readonly="readonly">a</textarea>
<button οnclick="reload();">重填</button>
</form>
<!--script language="javascript" src="autoFill.js"></script-->
</body>
<script language="javascript">
var bz=document.getElementById("bz");
function stChange(){
var s1=document.getElementById("jshf");
var index=s1.selectedIndex;


bz.innerHTML=s1.options[index].value;
}


function getValue(obj){
var zt = document.getElementsByName(obj);
 for(var i=0;i<zt.length;i++){
if(zt[i].checked) {//alert("选中了,先赋值");
//alert(zt[i].value);
bz.innerHTML=bz.innerHTML+" "+zt[i].value;
if(i<zt.length){//alert("选中,但后面还有:"+i);
for(var j=i+1;j<zt.length;j++){
//alert("i:"+i+"j:"+j);
//alert(document.getElementsByName(obj).item(j).value);
document.getElementsByName(obj).item(j).disabled=true;
}
}
}
else
{//alert("继续");
//alert(document.getElementsByName(obj).item(i).value);
document.getElementsByName(obj).item(i).disabled=true;
}
}
}


function reload(){
document.execCommand("Refresh");
}
</script
</html>