//设置两个div,实现
//jdzt1,jdzt 是两个下拉框id
jQuery(document).ready(function(){
var jdzt1 =document.getElementById("jdzt1").value;
var jdzt =document.getElementById("jdzt").value;
if(jdzt!="0") {
jdzt1="";
}
if(jdzt1!="") {
document.getElementById(‘div1‘).style.display = "block";
} else {
document.getElementById(‘div1‘).style.display = "none";
}
});
jQuery("#jdzt").bind("change",function(){
document.getElementById("jdzt1").value="";
var jdzt =document.getElementById("jdzt").value;
if(jdzt=="0") {
document.getElementById(‘div1‘).style.display = "block";
} else {
document.getElementById(‘div1‘).style.display = "none";
}
});
时间: 2024-10-27 19:23:34