屏幕输入页面input.asp
<% @ language=javascript %>
<html>
<head>
<title>请输入查询条件PLEASE INPUT CONDITION</title>
</head>
<form action=shotquery.asp METHOD="post" target="_self">
<input TYPE="text" size=6 maxlength=3 NAME=signalCode VALUE="代码"> </font></p>
</center></div><p></p>
<input LANGUAGE="JavaScript" TYPE="submit" VALUE=“确认” NAME="B1"
<input TYPE="reset" VALUE=“清除”NAME="B2">
<input LANGUAGE="JavaScript" TYPE="button" NAME="B3" VALUE=“返回”
ONCLICK="window.history.back()">
</font></p>
</center></div>
</form>
</body>
</html>
数据库处理程序shotquery.asp
<!--#include virtual="/master/lib.inc"-->
<script language=javascript runat=server>
var signalCode=Request.Form("signalCode");
dbConn = Server.CreateObject("ADODB.Connection");
dbConn.open("DSN=HT;UID=client;PWD=passwd");
rs = Server.CreateObject("ADODB.RecordSet");
var sqlStr = "select * from signaltab order by code";
rs.open(sqlStr,dbConn,1);
if(rs.RecordCount < 1) {
Response.write("<p> 无符合条件记录</p>");
Response.write("<p><form> <input type='button' value=' 返回' onclick='window.history.back()' name='b1'></form></p>");
}
else {
Response.write("<P><center><B>数据查询结果</B></center></P>");
Response.write("<tr><td><b>代码</b></td><td><b>分类</b></td><td><b>备注</b></td>");
for(var i = 1;i <= rs.Pagesize;i++) {
if(!rs.Eof) {
Response.write("<td><span style='font-size:9t'>"+rs("code")+"</span></td>");
Response.write("<td><span style='font-size:9t'>"+rs("class")+"</span></td>");
Response.write("<td><span style='font-size:9t'>"+rs("memo")+"</span></td>");
Response.write("</tr>");
rs.MoveNext();
}
else break;
}
Response.write("</table></form>");
rs.close();
dbConn.close();
}
</script>
相关性:毕业论文,免费毕业论文,大学毕业论文,毕业论文模板
上一页 [1] [2] [3] [4] [5] [6] [7]