function select1(){
var valu=document.getElementById("valu").value;
if(valu==1){ //是==,不是=
document.all.hid1.style.display='block';
document.all.hid2.style.display='none';
}
if(valu==2){ //是==,不是=
document.all.hid1.style.display='none';
document.all.hid2.style.display='block';
}
}
var valu=document.getElementById("valu").value;
if(valu==1){ //是==,不是=
document.all.hid1.style.display='block';
document.all.hid2.style.display='none';
}
if(valu==2){ //是==,不是=
document.all.hid1.style.display='none';
document.all.hid2.style.display='block';
}
}
<head>
<title>无??文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><SCRIPT LANGUAGE="JavaScript">function disp(){
hid2.style.display="none";
}function select1(){
var valu=document.getElementById("valu").value;
if(valu==1){
document.getElementById("hid1").style.display='';
document.getElementById("hid2").style.display='none';
}
if(valu==2){
document.getElementById("hid1").style.display='none';
document.getElementById("hid2").style.display='';
}
}
//-->
</SCRIPT><body onload="disp()"><select id="valu" name="sel" onchange="select1()">
<option value=1 > 1 </option>
<option value=2 > 2 </option>
</select>
<table id="hid1" width="200" border="1">
<tr>
<td> 11111 <td>
<td> 11111 </td>
</tr>
</table><table id="hid2" width="200" border="1">
<tr>
<td> 22222 </td>
<td> 22222 </td>
</tr>
</table></body> if(valu==1){ //等于 2个=1