当我选中几个复选框时,现在复选框底下的内容显示出来了,然后我这时点,浏览器上的“刷新”,这样的结果是,我开始选择的复选框,依然被选着,问题在这。。。。这个时候--复选框被选中,但是底下的内容却没有出来,用onload可以出来,关键不让用
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<body >
<fieldset><legend>申领低收入凭证、残疾人证及其它证件、证明情况</legend><BR><p>
<INPUT TYPE="checkbox" NAME="checkBox" id="1" onClick="show(this,001)">《广州市低收入困难家庭证》</p>
<table id="table1" style="display:none "cellspacing="0" cellpadding="0" border=1>
<tr>
<td width="84" >证号</td>
<td width="144" ><input type="text" name="CERTIFICATE_NUMBER"></td>
<td width="84" >发证日期</td>
<td width="120" ><input type="text" name="CERTIFICATE_DATE"></td>
<td width="72" >有效期限</td>
<td width="72" ><input type="text" name="CERTIFICATE_ DEADLINE"></td>
</tr>
<tr>
<td width="84" >持证人姓名</td>
<td width="144" ><input type="text" name="USER_NAME"></td>
<td width="84" >家庭人口</td>
<td width="120" ><input type="text" name="FAMILY_AMOUNT"></td>
<td width="72" >发证单位</td>
<td width="72" ><input type="text" name="CERTIFICATE_UNIT"></td>
</tr>
</table>
<p><INPUT TYPE="checkbox" NAME="checkBox" id="2" onClick="show(this,002)">《广州市城镇居民最低生活保障金领取证》</p>
<table id="table2" style="display:none " cellspacing="0" cellpadding="0" border=1>
<tr>
<td width="84" >证号</td>
<td width="144" ><input type="text" name="CERTIFICATE_NUMBER"></td>
<td width="84" >发证日期</td>
<td width="120" ><input type="text" name="CERTIFICATE_DATE"></td>
<td width="72" >有效期限</td>
<td width="72" ><input type="text" name="CERTIFICATE_ DEADLINE"></td>
</tr>
<tr>
<td width="84" >持证人姓名</td>
<td width="144" ><input type="text" name="USER_NAME"></td>
<td width="84" >家庭人口</td>
<td width="120" ><input type="text" name="FAMILY_AMOUNT"></td>
<td width="72" >发证单位</td>
<td width="72" ><input type="text" name="CERTIFICATE_UNIT"></td>
</tr>
</table>
<p><INPUT TYPE="checkbox" NAME="checkBox" id="3" onClick="show(this,003)">《广州市总工会特困职工优惠证》</p>
<table id="table3" style="display:none "cellspacing="0" cellpadding="0" border=1>
<tr>
<td width="84" >证号</td>
<td width="144" ><input type="text" name="CERTIFICATE_NUMBER"></td>
<td width="84" >发证日期</td>
<td width="120" ><input type="text" name="CERTIFICATE_DATE"></td>
<td width="72" >有效期限</td>
<td width="72" ><input type="text" name="CERTIFICATE_ DEADLINE"></td>
</tr>
<tr>
<td width="84" >持证人姓名</td>
<td width="144" ><input type="text" name="USER_NAME"></td>
<td width="84" >家庭人口</td>
<td width="120" ><input type="text" name="FAMILY_AMOUNT"></td>
<td width="72" >发证单位</td>
<td width="72" ><input type="text" name="CERTIFICATE_UNIT"></td>
</tr>
</table>
<p><INPUT TYPE="checkbox" NAME="checkBox" id="4" onClick="show(this,004)">《残疾人证》</p>
<table id="table4" style="display:none " cellspacing="0" cellpadding="0" border=1>
<tr>
<td width="84" >持证人姓名</td>
<td width="144" ><input type="text" name="USER_NAME"></td>
<td width="84" >残疾类别</td>
<td width="120" ><SELECT NAME="DEFORMITY_STATUS"></SELECT></td>
<td width="72" >残疾等级</td>
<td width="72" ><SELECT NAME="DEFORMITY_GRADE"></SELECT></td>
</tr>
<tr>
<td width="84" >持证人姓名</td>
<td width="144" ><input type="text" name="USER_NAME"></td>
<td width="84" >残疾类别</td>
<td width="120" ><SELECT NAME="DEFORMITY_STATUS"></SELECT></td>
<td width="72" >残疾等级</td>
<td width="72" ><SELECT NAME="DEFORMITY_GRADE"></SELECT></td>
</tr>
<tr>
<td width="84" >持证人姓名</td>
<td width="144" ><input type="text" name="USER_NAME"></td>
<td width="84" >残疾类别</td>
<td width="120" ><SELECT NAME="DEFORMITY_STATUS"></SELECT></td>
<td width="72" >残疾等级</td>
<td width="72" ><SELECT NAME="DEFORMITY_GRADE"></SELECT></td>
</tr>
</table>
<p><INPUT TYPE="checkbox" NAME="checkBox" id="5" onClick="show(this,005)">其它证件、证明(劳模、军烈属、孤寡老人等)</p>
<table id="table5" style="display:none "cellspacing="0" cellpadding="0" border=1>
<tr>
<td width="84" >名称</td>
<td width="144" ><input type="text" name="CERTIFICATE_NAME"></td>
<td width="84" >证号</td>
<td width="120" ><input type="text" name="CERTIFICATE_NUMBER"></td>
<td width="72" >内容摘要</td>
<td width="72" ><input type="text" name="CONTENT_ SUMMARY"></td>
</tr>
<tr>
<td width="84" >持证人姓名</td>
<td width="144" ><input type="text" name="USER_NAME"></td>
<td width="84" >发证单位</td>
<td width="120" ><input type="text" name="CERTIFICATE_UNIT"></td>
<td width="72" >备注</td>
<td width="72" ><input type="text" name="DEFORMITY_MEMO"></td>
</tr>
</table>
<BR><BR>
</fieldset>
<script language="javascript" type="text/javascript">
function show(chk,id){
var obj=eval("document.all.table"+id);
if(chk.checked==true){
obj.style.display='block';
}else if(chk.checked==false){
obj.style.display='none';
}
}
function initialize(){
var hh=eval(document.all.checkBox.length);
for(var i=1;i<=hh;i++){
var b=eval(i-1);
var aa=eval(document.all.checkBox[b]);
if(aa.checked==true){
var obj=eval("document.all.table"+i);
obj.style.display='block';
}else{}
}
}
initialize();
</script>
</body>
</html>