function a(obj1){
var x=obj1.innerHTML;
var y=document.getElementsByTagName("div");
switch(x){
case "房产":
y[1].setAttribute("display","none");
//y[2].display="none";y[0].display="block";
break;
case "家居":
y[0].display="none";y[2].display="none";y[1].display="block";
alert("2");
break;
case "二手房":
y[1].display="none";y[0].display="none";y[2].display="block";
alert("3");
break;
default:alert("4");break;
}
}
能把完整代码发出来吗?这样看还要猜HTML和CSS结构