📄 research.asp
字号:
<!--#include file="../includes/db.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>办公自动化系统</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 Userid = document.FormQuery.Userid.value;
if (!IsNumeric(Userid)){
alert("输入必须为数字!");
return false;
}
}
</script>
<link href="../Includes/Style.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
call insureID()
dim rsDept
dim rsPosition
set rsDept=server.createobject("Adodb.Recordset")
set rsPosition=server.createobject("Adodb.Recordset")
sql="SELECT * FROM Dept ORDER BY Dept_id DESC"
call openDB()
rsDept.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%"> </td>
</tr>
</table>
<center>
<form name="FormQuery" method="POST" action="Result.asp" onSubmit="javaScript:return validate();">
<table width="75%" border="0" cellpadding="0" cellspacing="1" bgcolor="#5A8BCE">
<tr>
<td height="35" align=left bgcolor="#E6F7FF"><div align="center"><b><font color="#000000">查询员工</font></b></div></td>
</tr>
</table>
<table width="75%" border="0" cellpadding="4" cellspacing="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" bgcolor="#5A8BCE">
<tr>
<td width="30%" bgcolor="#FCFCFC" height="19"> 职员ID</td>
<td width="45%" bgcolor="#FCFCFC" height="19"><input type="text" name="Userid" size="20"></td>
</tr>
<tr>
<td width="30%" bgcolor="#FCFCFC" height="19"> 职员姓名</td>
<td width="45%" bgcolor="#FCFCFC" height="19"><input type="text" name="Username" size="20"></td>
</tr>
<tr>
<td width="30%" bgcolor="#FCFCFC" height="19"> 所在部门</td>
<td width="45%" bgcolor="#FCFCFC" height="19"><select size="1" name="Dept_id">
<option value="" selected>--请选择--</option>
<%
while not rsDept.eof
response.write"<option value="""&rsDept("Dept_id")&""">"&rsDept("Dept_name")&"</option>"
rsDept.MoveNext
wend
%>
</select></td>
</tr>
<tr>
<td width="30%" bgcolor="#FCFCFC" height="17"> 职位</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 name="Enter" type="submit" class="buttonface" id="Enter" value="提交"></td>
</tr>
</table>
</form>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -