隐藏DIV 显示DIV
昨天做项目,用到了隐藏和显示DIV,在页面加载的时候,默认隐藏,当触发一个服务器控件时,显示此DIV,然后对此操作完成后,在点击DIV上服务器控件隐藏DIV,方法很简单,可以用客户端控件,同样的道理。 下面就把代码贴出来。 第一设置CSS <style type="text/css"> .selectName { margin-left: 30%; width: 150px; height: 150px; margin-top: 30px; position: absolute; background-color: #eef6ff; z-index: 0; display: none; } </style> 第二是DIV <!--DIV 默认隐藏--> <div id="divBatchName" class="selectName"> <div style="height: 50px; margin-top: 20px;"> <label> 批次名称</label> <asp:DropDownList ID="ddlSelectBatchName" runat="server" AutoPostBack="true" > </asp:DropDownList> </div> <div style="margin-top: 20px"> <asp:Button ID=