RoadFlow2.1 临时演示

Login1.aspx 3.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login1.aspx.cs" Inherits="WebForm.Login1" %>
  2. <!DOCTYPE html>
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head runat="server">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  6. <title></title>
  7. </head>
  8. <body>
  9. <form id="form1" runat="server">
  10. <br />
  11. <input type="hidden" id="Force" name="Force" value="0" />
  12. <table cellpadding="0" cellspacing="1" border="0" style="width:95%; margin:0 auto;">
  13. <tr>
  14. <td style="width:70px; height:45px; text-align:right;">帐号:</td>
  15. <td><input type="text" class="mytext" id="Account" name="Account" value="" maxlength="50" style="width:170px;" /></td>
  16. </tr>
  17. <tr>
  18. <td style="height:45px; text-align:right;">密码:</td>
  19. <td><input type="password" class="mytext" id="Password" name="Password" maxlength="50" style="width:170px;" /></td>
  20. </tr>
  21. <tr id="novcode" style="display:none;">
  22. <td style="height:45px; text-align:right;">验证码:</td>
  23. <td><input type="text" class="mytext" id="VCode" name="VCode" maxlength="4" style="width:80px;" />
  24. <img alt="" src="VCode.ashx?<%=DateTime.Now.Ticks %>" onclick="cngimg();" style="vertical-align:middle;" id="VcodeImg" />
  25. </td>
  26. </tr>
  27. <tr>
  28. <td>&nbsp;</td>
  29. <td>
  30. <input type="submit" value="&nbsp;&nbsp;登&nbsp;&nbsp;录&nbsp;&nbsp;" id="loginbutton" name="loginbutton" onclick="return checkForm();" class="mybutton" />
  31. </td>
  32. </tr>
  33. <%if("1"!=Request.QueryString["session"]){%>
  34. <tr>
  35. <td>&nbsp;</td>
  36. <td style="text-align:left; vertical-align:bottom; height:23px;"><span style="color:blue; margin-right:10px;">用户名:xh 密码:111</span><%--<a href="http://www.cqroad.cn" target="_blank" ><span style="color:blue;">官网:cqroad.cn</span></a>--%></td>
  37. </tr>
  38. <%} %>
  39. </table>
  40. </form>
  41. <script type="text/javascript">
  42. var isVcode = '1' == '<%=Session[RoadFlow.Utility.Keys.SessionKeys.IsValidateCode.ToString()]%>';
  43. var isSessionLost = "1" == '<%=Request.QueryString["session"]%>';
  44. $(window).load(function ()
  45. {
  46. if (isVcode)
  47. {
  48. if (!isSessionLost)
  49. {
  50. top.win.resize(300, 250);
  51. }
  52. $("#novcode").show();
  53. }
  54. <%=Script%>
  55. });
  56. function checkForm()
  57. {
  58. var form1 = document.forms[0];
  59. if ($.trim(form1.Account.value).length == 0)
  60. {
  61. alert("帐号不能为空!");
  62. form1.Account.focus();
  63. return false;
  64. }
  65. if ($.trim(form1.Password.value).length == 0)
  66. {
  67. alert("密码不能为空!");
  68. form1.Password.focus();
  69. return false;
  70. }
  71. if (isVcode && form1.VCode && $.trim(form1.VCode.value).length == 0)
  72. {
  73. alert("验证码不能为空!");
  74. form1.VCode.focus();
  75. return false;
  76. }
  77. return true;
  78. }
  79. function cngimg()
  80. {
  81. $('#VcodeImg').attr('src', 'VCode.ashx?' + new Date().toString());
  82. }
  83. </script>
  84. </body>
  85. </html>