admin_add.aspx
上传用户:szraylite
上传日期:2018-06-06
资源大小:11546k
文件大小:4k
源码类别:

软件测试

开发平台:

Java

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="admin_add.aspx.cs" Inherits="admin_admin_add" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  3. <HTML>
  4. <HEAD>
  5. <title>Admin_Add</title>
  6. <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
  7. <meta content="C#" name="CODE_LANGUAGE">
  8. <meta content="JavaScript" name="vs_defaultClientScript">
  9. <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
  10. <LINK href="Admin_Style.css" type="text/css" rel="stylesheet">
  11. </HEAD>
  12. <body>
  13. <form id="Form1" method="post" runat="server">
  14. <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  15. <tr>
  16. <td height="22" colspan="2" align="center" class="title"><strong>管 理 员 管 理</strong></td>
  17. </tr>
  18. <tr class="tdbg">
  19. <td width="70" height="30"><strong>管理导航:</strong></td>
  20. <td height="30"><a href="">管理员管理首页</a>&nbsp;|&nbsp;<a href="">新增管理员</a></td>
  21. </tr>
  22. </table>
  23. <table class="border" cellSpacing="1" cellPadding="0" width="100%" align="center" border="0">
  24. <tr>
  25. <td class="title" align="center" colSpan="3"><strong id="STRONG1" runat="server">新 增 管 理 员</strong>
  26. <DIV></DIV>
  27. </td>
  28. </tr>
  29. <tr class="tdbg">
  30. <td class="tdbg" width="35%"><strong>用 户 名:</strong></td>
  31. <td class="tdbg" width="65%"><input id="txb_Name" type="text" name="username" runat="server">
  32. &nbsp;</td>
  33. </tr>
  34. <tr class="tdbg">
  35. <td class="tdbg" width="35%"><strong>初始密码: </strong>
  36. </td>
  37. <td class="tdbg" width="65%"><font size="2"><input id="txb_FPwd" type="password" name="Password" runat="server">
  38. </font>
  39. </td>
  40. </tr>
  41. <tr class="tdbg">
  42. <td class="tdbg" width="35%"><strong>确认密码:</strong></td>
  43. <td class="tdbg" width="65%"><font size="2"><input id="txb_SPwd" type="password" name="PwdConfirm" runat="server">
  44. <asp:comparevalidator id="CompareValidator1" runat="server" ControlToValidate="txb_SPwd" ControlToCompare="txb_FPwd"
  45. ErrorMessage="*两次密码不一样"></asp:comparevalidator></font></td>
  46. </tr>
  47. </table>
  48. <table class="border" cellSpacing="1" cellPadding="0" width="100%" align="center" border="0">
  49. <tr>
  50. <td class="tdbg" align="center" colSpan="2" style="height: 40px"><INPUT id="hid_Value" type="hidden" runat="server">&nbsp;<asp:Button ID="add" runat="server"
  51.                             OnClick="add_Click" Text="添加" Width="55px" />
  52.                         &nbsp;
  53.                         <asp:Button ID="cancle" runat="server" Text="取消" Width="63px" /></td>
  54. </tr>
  55. </table>
  56. </form>
  57. <script language="JavaScript" type="text/JavaScript">
  58. function Add_Click()
  59. {
  60. if (document.all.txb_Name.value=="")
  61. {
  62. alert("用户名不能为空!");
  63. document.all.txb_Name.focus();
  64. return false;
  65. }
  66. if (document.all.txb_FPwd.value == "" )
  67. {
  68. alert("密码不能为空!");
  69. document.all.txb_FPwd.focus();
  70. return false;
  71. }
  72. if (document.all.txb_SPwd.value == "")
  73. {
  74. alert("再次输入密码!");
  75. document.all.txb_SPwd.focus();
  76. return false;
  77.  }
  78. document.all.btn_Add.click();
  79. }
  80. function Cancel_Click()
  81. {
  82. window.location.href='Admin.aspx';
  83. }
  84. function Check(obj)
  85. {
  86. if (obj.checked == true)
  87. {
  88. document.all.hid_Value.value += obj.value + ",";
  89. }
  90. else
  91. {
  92. document.all.hid_Value.value = document.all.hid_Value.value.replace(obj.value + ",","");
  93. }
  94. }
  95. </script>
  96. </body>
  97. </HTML>