日期:2014-05-18 浏览次数:20620 次
遮罩层样式 .black_overlay { display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color:Gray; z-index: 1001; -moz-opacity: 0.6; opacity: .80; filter: alpha(opacity=50); } <script language="javascript" type="text/javascript"> function ShowDiv() { G('showDiv').style.display = 'block'; G('fade').style.display = 'block'; G('fade').style.height = Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight) + 'px'; } function CloseDiv() { G('showDiv').style.display = 'none'; G('fade').style.display = 'none' } function CheckForm() { if (G("txtDepName").value.replace(/\s/g, "") == "") { alert("名称不能为空!"); G("txtDepName").focus(); return false; } return true; } </script> +++++++++++++++++++++++++++++++ <a href="javascript:ShowDiv();"><img src="../images/add.gif" border="0" />添加部门</a> 遮罩层 <div id="fade" class="black_overlay"></div> 弹出层 <div id="showDiv" style="width: 500px; display:none"> <table width="500px" cellpadding="0" cellspacing="0"> <tr> <td colspan="4"> <p class="title2"> <span>部门信息</span><img src="../images/close.jpg" onclick="CloseDiv();" alt="关闭" width="14" height="14" /></p> </td> </tr> <tr> <td align="right"> <font color='red'>*</font>名称: </td> <td align="left"> <asp:TextBox runat="server" ID="txtDepName"></asp:TextBox> </td> <td align="right"> 上级单位 </td> <td align="left"> <asp:DropDownList runat="server" ID="dlDep" DataTextField="DepName" DataValueField="DepID"> </asp:DropDownList> </td> </tr> <tr> <td align="right"> 简称: </td> <td align="left"> <asp:TextBox runat="server" ID="txtJC"></asp:TextBox> </td> <td align="right"> 排序号: