作者在 2007-07-27 00:46:00 发布以下内容
<select id="ct" name="ct" onchange="javascript:showmore()">
<option selected="selected" value="">请选择</option>
<option value="显示">显示</option>
<option value="不显示">不显示</option>
</select>
<span id="jc1" style="display: none">1111111111</span> <span id="jc2" style="display: none">
2222222222</span>
<script>
function showmore() {
var ct = document.getElementById("ct").value;
var El1 = document.getElementById("jc1");
var El2 = document.getElementById("jc2");
//alert(ct);
if (ct == "显示") {//注意等号的使用^_^
El1.style.display="";
El2.style.display="";
}
else
{
El1.style.display="none";
El2.style.display="none";
}
}
</script>
<option selected="selected" value="">请选择</option>
<option value="显示">显示</option>
<option value="不显示">不显示</option>
</select>
<span id="jc1" style="display: none">1111111111</span> <span id="jc2" style="display: none">
2222222222</span>
<script>
function showmore() {
var ct = document.getElementById("ct").value;
var El1 = document.getElementById("jc1");
var El2 = document.getElementById("jc2");
//alert(ct);
if (ct == "显示") {//注意等号的使用^_^
El1.style.display="";
El2.style.display="";
}
else
{
El1.style.display="none";
El2.style.display="none";
}
}
</script>