div1,2,3,4,
层还是只显示了div1
List<int> sysList = (List<int>)DB_RoleRightManager.GetSysByRoleId(admin.RoleId);
string myscript = "";
foreach (int item in sysList)
{
myscript += "showDiv('div"+item+"');";
}
Page.ClientScript.RegisterStartupScript(this.GetType(), "myscript", "<script>"+myscript+"</script>");function showDiv(divId)
{
document.getElementById(divId).style.display="block";
}
层还是只显示了div1
List<int> sysList = (List<int>)DB_RoleRightManager.GetSysByRoleId(admin.RoleId);
string myscript = "";
foreach (int item in sysList)
{
myscript += "showDiv('div"+item+"');";
}
Page.ClientScript.RegisterStartupScript(this.GetType(), "myscript", "<script>"+myscript+"</script>");function showDiv(divId)
{
document.getElementById(divId).style.display="block";
}
解决方案 »
- CheckBool问题,小菜请教
- Response.Expires有什么作用?
- 怎么才能控制GridView模版列里控件的样式???
- DataGrid 在它的Style里面自动生成了"border-collapse:collapse;",它弄的生成的Table没有边框,怎么把它去掉,不让它生成?
- SharePoint是什么啊
- 学习.net遇到问题了,请DX们指教小弟,感谢不尽!
- 关于用代码动态加载用户控件的问题
- 如何得到一个目录下的所以文件的名字?
- 怎样用DataSet更新数据库
- asp.net中判断书库为空和asp一样??
- javascript出错:Microsoft JScript runtime error 'this.$' is null or not an object
- asp.net页面如何判断刷新还是关闭?
2、检查各个DIV是否存在遮盖(z-index)、大小设置问题
没有遮盖,就算高度设置有问题,已经加了滚动条了myscript查出来是showDiv('div1');showDiv('div2');showDiv('div3');showDiv('div4');
代码和CSS样式发上来看下
<div id="main">
<div id="left">
<div class="nbbwork_title4">
<p>
<label>
当前用户:<asp:Label ID="lbl_admin" runat="server" Text="Label"></asp:Label></label></p>
</div>
<div class="p25" style="overflow: auto; height: 880px; width: 180px; margin-left: 10px;">
<div class="mb margin-bottom20" id="plgl">
<div class="nbbwork_title5">
<label>
评论管理</label></div>
<div class="_right">
<asp:TreeView ID="tvPrograma" runat="server" ShowLines="True" OnSelectedNodeChanged="tvPrograma_SelectedNodeChanged">
</asp:TreeView>
</div>
</div>
<div class="margin-bottom20 mb xx" id="div1" runat="server"></div>
</div></div></div>.nbbwork_title4 p{margin-left:35px; margin-top:5px; color:#FFF;}
.nbbwork_title5{background:url(img/ico1.gif) no-repeat; height:30px;}
.nbbwork_title5 label{margin-left:30px;}
#left{ width:248px; float:left;height:970px; background:url(img/nbb_left.png) no-repeat;}
我没隐藏层的时候都能出来
加上type='text/javascript'行吗!!总是有人不写这个,估计是被挡住了
如果你在前台body的onload方法中把你的4个div都show出来,看会不会显示完全?