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

📄 query.asp

📁 功能强大的网络办公系统 支持油箱管理,短消息,文件管理,考勤管理等功能
💻 ASP
字号:
<!--#include file="../includes/keepHouse.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>WebOffice</title>
<script language="javaScript">
function IsNumeric(sText){
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;
   for (i = 0; i < sText.length && IsNumber == true; i++) { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1){
         IsNumber = false;
      }
   }
   return IsNumber;
}

function validate(){ 
   var PERSONNEL_ID = document.FormQuery.PERSONNEL_ID.value;
   if (!IsNumeric(PERSONNEL_ID)){
      alert("输入必须为数字!");
      return false;
   }
}
</script>
</head>

<body>
<%
call insureID()
dim rsDepartment
dim rsPosition
set rsDepartment=server.createobject("Adodb.Recordset")
set rsPosition=server.createobject("Adodb.Recordset")
sql="SELECT * FROM Department ORDER BY DEPT_ID DESC"
call openDB()
rsDepartment.open sql,conn,1,1
sql="SELECT * FROM Position ORDER BY POSITION_ID DESC"
rsPosition.open sql,conn,1,1
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="40">
 <tr>
  <td width="100%">&nbsp;</td>
 </tr>
</table>
<center>
<form name="FormQuery" method="POST" action="ansQ.asp" onSubmit="javaScript:return validate();">
<table border="0" width="75%" cellspacing="0" cellpadding="0">
 <tr>
  <td width="5%" bgcolor="#0000FF" height="35" align=left><img border="0" src="../images/back.gif"></td>
  <td width="65%" bgcolor="#0000FF" height="35" align=center><b><font color="#FFFFFF">查询员工</font></b></td>
  <td width="5%" bgcolor="#0000FF" height="35" align=right><img border="0" src="../images/Close2.gif"></td>
 </tr>
</table>
<table border="1" width="75%" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0">
  <tr>
   <td width="30%" bgcolor="#FCFCFC" height="19">&nbsp;职员ID</td>
   <td width="45%" bgcolor="#FCFCFC" height="19"><input type="text" name="PERSONNEL_ID" size="20"></td>
  </tr>
  <tr>
   <td width="30%" bgcolor="#FCFCFC" height="19">&nbsp;职员姓名</td>
   <td width="45%" bgcolor="#FCFCFC" height="19"><input type="text" name="PERSON_NAME" size="20"></td>
  </tr>
  <tr>
   <td width="30%" bgcolor="#FCFCFC" height="19">&nbsp;所在部门</td>
   <td width="45%" bgcolor="#FCFCFC" height="19"><select size="1" name="DEPT_ID">
   <option value=""  selected>--请选择--</option>
   <%
	while not rsDepartment.eof
		response.write"<option value="""&rsDepartment("DEPT_ID")&""">"&rsDepartment("DEPARTMENT")&"</option>"
		rsDepartment.MoveNext
	wend
   %>
   </select></td> 
  </tr>
  <tr>
   <td width="30%" bgcolor="#FCFCFC" height="17">&nbsp;职位</td>
   <td width="45%" bgcolor="#FCFCFC" height="17"><select size="1" name="POSITION_ID">
   <option value=""  selected>--请选择--</option>
   <%
	while not rsPosition.eof
		response.write"<option value="""&rsPosition("POSITION_ID")&""">"&rsPosition("POSITION_NAME")&"</option>"
		rsPosition.MoveNext
	wend
	call closeDB()
   %>
    </select></td> 
  </tr>
  <tr>
   <td width="75%" height=50 colspan="2" bgcolor="#EFEFEF" align=center>
   <input type="submit" value="提交" name="Submit" class="buttonface"></td>
  </tr>
 </table>
</form>
</center>
</body>
</html>

⌨️ 快捷键说明

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