⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 useradd.asp

📁 留言簿毕业设计用ASP和SQL2000开发的能够链接
💻 ASP
字号:

<script language="JavaScript">
function checkform()
{
  var UserId
  UserId=document.myform.UserId.value
  if(UserId=="")
  {
    alert("你还没有填编号!");
    document.myform.UserId.focus();
    return false;
  }
  if(isNaN(UserId))
  {
    alert("编号必须由数字组成!");
    document.myform.UserId.focus();
    return false;
  }
  if(UserId.length<1)
  {
    alert("编号位数最少为1位!");
    document.myform.UserId.focus();
    return false;
  }
  if(UserId>200800000000)
  {
    alert("编号超出范围!请不要乱输学号,否则会给以后的管理造成麻烦。");
    document.myform.UserId.focus();
    return false;
  }
   if(document.myform.UserName.value=="")
  {
    alert("你还没有填姓名!");
    document.myform.UserName.focus();
    return false;
  }
}
function SetEnrollment()
{
  var UserId;
  UserId=document.myform.UserId.value;
  if(UserId>=4)
  {
	document.myform.enrollment.value=UserId.substring(0,4)+"-9-1";
  }
}
  </Script>
  <link href="../pic/home.css" rel="stylesheet" type="text/css">
  <!--
body {
	background-image: url(../images/backcolor.gif);
}
-->
  <style type="text/css">
<!--
body {
	background-image:  url(../pic/backcolor.gif);
}
.style2 {color: #996600}
.style3 {color: #990000}
.style4 {color: #993300}
-->
  </style>
  <script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
  </script>
  
<FORM Name=myform onsubmit="return checkform()" action="UserSave.asp" method="POST">
  <table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td><IFRAME marginWidth=0 marginHeight=0 
      src="../pic.asp" frameBorder=0 width=600 scrolling=no 
      height=23></IFRAME>&nbsp;</td>
    </tr>
    <tr>
      <td><table width="351" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td></td>
        </tr>
        <tr>
          <td width="351" height="27">编号:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <input Name=UserId class=rec_form id="UserId" onChange="SetEnrollment()">
&nbsp;&nbsp; </td>
        </tr>
        <tr>
          <td height="28">&#22995;&#21517;&#65306;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
            <input name="UserName" type="text" id="UserName"></td>
        </tr>
        <tr>
          <td height="29">&#24615;&#21035;&#65306;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input name="xingbie" type="text" id="xingbie"></td>
        </tr>
        <tr>
          <td height="21">部门:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input name="bumen" type="text" id="bumen"></td>
        </tr>
        <tr>
          <td height="23">生日:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input name="riqi" type="text" id="riqi"></td>
        </tr>
        <tr>
          <td height="23">籍贯:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input name="jiguan" type="text" id="jiguan"></td>
        </tr>
        <tr>
          <td height="23">学历:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input name="xueli" type="text" id="xueli"></td>
        </tr>
        <tr>
          <td height="22">&#19987;&#19994;&#65306;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input name="zhuanye" type="text" id="zhuanye"></td>
        </tr>
        <tr>
          <td height="25">政治面貌:&nbsp;&nbsp;
            <input name="mianmao" type="text" id="mianmao"></td>
        </tr>
        <tr>
          <td height="24">职称&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input name="zhicheng" type="text" id="zhicheng"></td>
        </tr>
        <tr>
          <td><%
										if UserId<>"" then
											 response.write "<script language='JavaScript'>document.myform.UserName.focus();</script>"
										else
											 response.write "<script language='JavaScript'>document.myform.UserId.focus();</script>"
										end if
										%>
&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input name="submit" type="image" src="../pic/buttonLogin1.jpg" align="middle" width="52" height="18">
&nbsp;&nbsp; <a href='javascript:Clearmyform()'><img src="../pic/buttonClear.gif" alt="清除" name="clear" width="52" height="18" border="0" align="middle"></a></td>
        </tr>
      </table></td>
    </tr>
  </table>
  <input type="hidden" name="flag" value="new">
</form>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -