日期:2014-05-17  浏览次数:20496 次

验证不通过时div窗口不关闭
就是一个用户登录的div窗体,当没有输入账号和密码。在点击登录按钮时弹出的Div窗体不关闭。
下面是我的从code:
<div id="loginBox">
<table>
<tr>
<td rowspan="4" width="20px">&nbsp;</td>
<td align="right" width="50px">
<asp:Label ID="lblID" runat="server" Text="帐号:"></asp:Label>
</td>
<td colspan="2">
<input id="txtAccount" type="text" runat="server" maxlength="50" />
</td>
<td rowspan="5">
<asp:ImageButton ID="imgBtnLoginLarge" runat="server" ImageUrl="images/login/login_button_login.png" BorderWidth="0px"
ImageAlign="Middle" Width="96px" Height="96px" OnClick="imgbtnLogin_Click" OnClientClick="LockPage();" />
</td>
</tr>
<tr>
<td align="right" width="50px">
<asp:Label ID="lblPassword" runat="server" Text="密码:"></asp:Label>
</td>
<td colspan="2">
<input id="txtPassword" runat="server" type="password" maxlength="19" />
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2"><a href="WebPage/Account/AccountRegistrationForEyeII.aspx?type=1" onclick="LockPage();">
  <%= GetString("DEFAULT_REGISTER_EYEII")%></a>&nbsp; &nbsp; &nbsp; &nbsp; <a href="WebPage/Account/ForgetID.aspx?type=1" onclick="LockPage();">
  <%= GetString("DEFAULT_FORGET_ID")%></a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2"><a href="WebPage/Account/ForgetPassword.aspx?type=1" onclick="LockPage();">
  <%= GetString("DEFAULT_FORGET_PASSWORD")%></a>&nbsp; &nbsp; &nbsp; &nbsp; <a href="WebPage/Account/ResendActivationEmailOrSMS.aspx?type=1" onclick="LockPage();">
  <%= GetString("DEFAULT_RESEND_ACTIVATION_EMAIL")%></a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td colspan="2"><asp:Label ID="lblMsg" runat="server" ForeColor="Red"></asp:Label></td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="4"><img src="images/login/login_desc.png"></td>
<td><a href="WebPage/Account/AccountRegister.aspx?type=1" onclick="LockPage();"><img src="images/login/login_button_register.png"></a></td>
</tr>
</table>
</div>
<div id="loginBoxClose">
<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'"><img src="images/login/login_button_close.png"></a>
</div>

---