<script Language="JavaScript"> function changeFormat()
{ var obj=document.form1.lm.value; var ss=obj.split(" ¦")[1];
// return ss; //////////
alert(ss);
if(ss.value=="1")
{
document.all("a").style.display="none";
document.all("b").style.display="";
}
else if(ss.value=="4")
{
document.all("a").style.display="";
document.all("b").style.display="none";
}
else
{
document.all("a").style.display="none";
document.all("b").style.display="none";
}
}
</script>
<body>
<table>
<form method="post" name="form1">
<tr> <td> <select size="1" name="lm" onchange="changeFormat();">
<option value="1 ¦2 ¦3 ¦"> </option>
<option value="4 ¦5 ¦6 ¦"> </option>
</select> </td> </tr>
<tr id="a"> <td>11111 </td> </tr>
<tr id="b"> <td>22222 </td> </tr>
</form>
</table>
</body>
{ var obj=document.form1.lm.value; var ss=obj.split(" ¦")[1];
// return ss; //////////
alert(ss);
if(ss.value=="1")
{
document.all("a").style.display="none";
document.all("b").style.display="";
}
else if(ss.value=="4")
{
document.all("a").style.display="";
document.all("b").style.display="none";
}
else
{
document.all("a").style.display="none";
document.all("b").style.display="none";
}
}
</script>
<body>
<table>
<form method="post" name="form1">
<tr> <td> <select size="1" name="lm" onchange="changeFormat();">
<option value="1 ¦2 ¦3 ¦"> </option>
<option value="4 ¦5 ¦6 ¦"> </option>
</select> </td> </tr>
<tr id="a"> <td>11111 </td> </tr>
<tr id="b"> <td>22222 </td> </tr>
</form>
</table>
</body>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货