📄 stuinfo.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/connection.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("XH") <> "") Then
Recordset1__MMColParam = Request.QueryString("XH")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_connection_STRING
Recordset1.Source = "SELECT * FROM dbo.XS WHERE XH = '" + Replace(Recordset1__MMColParam, "'", "''") + "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<link href="main.css" type="text/css" rel="stylesheet">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<script language="JavaScript" type="text/javascript">
function checkForm()
{
var xh,xm;
var msg;
xh=document.form1.xh.value;
xm=document.form1.xm.value;
msg="";
if (xh=="")
msg+="学号不能为空\n";
if (xm=="")
msg+="姓名不能为空\n";
if (msg=="")
return true;
else
{
window.alert(msg);
return false;
}
}
</script>
<form id="form1" name="form1" method="post" action="DealStuRegister.asp">
<table width="364" border="0" align="center">
<caption align="top">
学生信息录入
</caption>
<tr>
<td>学号</td>
<td><label>
<input name="xh" type="text" class="newInput" id="xh" value="<%=(Recordset1.Fields.Item("XH").Value)%>" size="12" maxlength="6" />
*
</label></td>
</tr>
<tr>
<td>姓名</td>
<td><input name="xm" type="text" class="newInput" id="xm" value="<%=(Recordset1.Fields.Item("XM").Value)%>" size="12" maxlength="8" />
*</td>
</tr>
<tr>
<td>性别</td>
<td>男
<label>
<input <%If (CStr((Recordset1.Fields.Item("XB").Value)) = CStr("1")) Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="xb" value="1" />
</label>
女
<label>
<input <%If (CStr((Recordset1.Fields.Item("XB").Value)) = CStr("0")) Then Response.Write("checked=""checked""") : Response.Write("")%> type="radio" name="xb" value="0" />
</label></td>
</tr>
<tr>
<td>出生时间</td>
<td><label>
<input name="cssj" type="text" class="newInput" id="cssj" size="12" maxlength="10" />
(格式:1985-05-01)</label></td>
</tr>
<tr>
<td>专业名称</td>
<td><label>
<select name="zy" size="1" class="newInput" id="zy">
<option selected="selected">--请选择--</option>
<option value="计算机">计算机</option>
<option value="通信工程">通信工程</option>
<option value="教育技术">教育技术</option>
</select>
</label></td>
</tr>
<tr>
<td>总学分</td>
<td><label>
<input name="zxf" type="text" class="newInput" id="zxf" value="0" size="12" />
</label></td>
</tr>
<tr>
<td height="60">备注</td>
<td><label>
<div align="left"><br />
<textarea name="bz" cols="30" rows="5" class="newInput" id="bz"></textarea>
<br />
<br />
</div>
</label></td>
</tr>
<tr>
<td colspan="2"><label>
<div align="center">*表示必须填写的项目
</div>
<div align="center"></div>
<div align="center">
<input type="submit"onclick="javascript:return checkForm();" name="Submit" value="提交" />
<input type="reset" name="Submit2" value="重置" />
</div>
</label></td>
</tr>
</table>
</form>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -