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

📄 studentmodify.asp

📁 在线考试系统
💻 ASP
字号:
<?xml version="1.0" encoding="gb2312"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="main.css" rel="stylesheet" type="text/css">
<!---#include file="conn.asp"--->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script>
function checkForm(){
	if(form1.StuId.value==""){
	alert("请填写学号!");
	form1.StuId.focus();
	return false;
	}
	if(form1.Name.value==""){
	alert("请填写学生姓名!");
	form1.Name.focus();
	return false;
	}
	if(form1.year.value=="" ){
	alert("请填写出生日期!");
	form1.year.focus();
	return false;
	}
	if(form1.day.value=="" ){
	alert("请填写出生日期!");
	form1.day.focus();
	return false;
	}
	if(form1.month.value=="" ){
	alert("请填写出生日期!");
	form1.month.focus();
	return false;
	}
	return true;
}
</script>

<title>无标题文档</title>
<%
id=request.QueryString("Id")
set rst=conn.execute("select * from student where StuId='"&id&"'")
%>
</head>

<body>
<h3 align="center">修改新学生</h3>
<form name="form1" id="form1" method="post" action="StudentUpdate.asp?oper=modify&id=<%=id%>" onsubmit="return checkForm();">
  <table width="325" border="1" align="center" cellpadding="2" cellspacing="2" bordercolor="#999999">
    <tr> 
      <td width="86" align="right" bgcolor="#F3F3F3">*学号:</td>
      <td width="230"><input name="StuId" type="text" id="StuId"  value="<%=rst("StuId")%>" /></td>
    </tr>
    <tr> 
      <td align="right" bgcolor="#F3F3F3">*姓名:</td>
      <td><input name="Name" type="text" id="Name" value="<%=rst("Name")%>" /></td>
    </tr>
    <tr> 
      <td align="right" bgcolor="#F3F3F3">*性别:</td>
      <td><select name="sex" id="sex">
          <option value="男" <%if(rst("sex")="男") then response.write("selected")%>>男</option>
          <option value="女" <%if(rst("sex")="女") then response.write("selected")%>>女</option>
        </select></td>
    </tr>
    <tr> 
      <td align="right" bgcolor="#F3F3F3">*出生日期:</td>
      <td> <input name="year" type="text" id="year" value="<%=left(rst("birthday"),4)%>" size="5" />
        <input name="month" type="text" id="month" value="<%=mid(rst("birthday"),6,1)%>" size="5" />
        <input name="day" type="text" id="day" value="<%=mid(rst("birthday"),8,1)%>" size="5" />
        日 </td>
    </tr>
    <tr> 
      <td align="right" bgcolor="#F3F3F3">身份证号:</td>
      <td><input name="IdNum" type="text" id="IdNum" value="<%=rst("IdNum")%>" /></td>
    </tr>
    <tr align="center"> 
      <td colspan="2"> 
        <input type="submit" name="Submit" value="提交" />
        <input type="submit" name="Submit2" value="提交" />
      </td>
    </tr>
  </table>
  <%
    rst.close()
  conn.close()
  set rst=nothing
  set conn=nothing
  %>
</form>
</body>
</html>

⌨️ 快捷键说明

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