the suggested way is to hide your dropdownlist with style.display="none" or style.visibility="hidden" when you expand your menu, and show the dropdownlist with style.display="" or style.visibility="visible" when you collapse your menu
如何隐藏页面中的所有dropdownlist控件,请给个例子
<script language=javascript> function ShowDropDowns(bShow) { var selects = document.getElementsByTagName("SELECT"); for(var i=0; i < selects.length; i++) selects[i].style.visibility = (bShow? "visible":"hidden"); } </script>
我用的是asp服务器控件,并且页面的dropdownlist控件的数量和位置不固定。
我用的是服务器控件〈select>好象不行啊
谢谢 saucer(思归)可以了!
on the client side, DropDownlists become HTML <SELECT>, my code above doesn't care how many selects you haveif you only need to hide some dropdownlist, trydocument.getElementById("<%=DropDownList1.ClientID%>").style.visibility = "hidden";
this.iframe.Attributes["src"] = "XXXX.aspx"
你可以指定XXXX.aspx页面有某个Table控件
如果你还想在XXXX.aspx页面里面动态来装载某个Table控件的话
this.iframe.Attributes["src"] = "XXXX.aspx?EditType='add'&Control='XXTable'"
不过我现在都不这么做了,什么都动态装载用户控件算了!
在页面中动态添加层div,再在层中添加table,以次生成动态菜单,但总被dropdownlist控件挡住,听说用iframe做载体可以解决。请问各位大哥怎么动态添加ifrme啊????
function ShowDropDowns(bShow)
{
var selects = document.getElementsByTagName("SELECT");
for(var i=0; i < selects.length; i++)
selects[i].style.visibility = (bShow? "visible":"hidden");
}
</script>
我的页面使用一个iframe来显示菜单中的连接页面,那么在主页面中如何隐藏iframe页面中
的dropdownlist控件??????