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

📄 stuedit.asp

📁 使用asp+sqlserver2000编写的学生管理系统
💻 ASP
字号:
<!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>
<!--#include file="inc/adovbs.inc" -->
<!--#include file="inc/conn.inc" -->
<% 
dim cmd,rs,xh
xh=request.QueryString("xh")
set cmd= Server.CreateObject("adodb.command")
set rs= Server.CreateObject("adodb.recordset")
cmd.commandtype=adCmdText
cmd.commandtext="select * from xs where xh='"&xh&"'"
cmd.activeconnection=conn
set rs=cmd.execute
if (rs.eof) then
   response.End
end if
 %>
<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="dealStuEdit.asp">
  <table width="364" border="0" align="center" bordercolor="#FF0000">
    <caption align="top">
      学生信息编辑
    </caption>
    
    <tr>
      <td>学号</td>
      <td><label>
        <input name="xh" type="text"   readonly="true" value= <%= rs("xh") %> class="newInput" id="xh" size="12" maxlength="6" />
        *
      </label></td>
    </tr>
    <tr>
      <td>姓名</td>
      <td><input name="xm" type="text"  value= <% =rs("xm") %> class="newInput" id="xm" size="12" maxlength="8" />
        *</td>
    </tr>
    <tr>
      <td>性别</td>
      <td>男
        <input <%If (rs("xb")= "True") Then Response.Write("checked=""checked""")  %> name="xb" type="radio" value="1" />
<input <%If (rs("xb")="False") Then Response.Write("checked=""checked""") %> type="radio" name="xb" value="0" /></td>
    </tr>
    <tr>
      <td>出生时间</td>
      <td><label>
        <input name="cssj" type="text" class="newInput" id="cssj" size="12" maxlength="10" value=<%= rs("cssj") %> />
      (格式:1985-05-01)</label></td>
    </tr>
    <tr>
      <td>专业名称</td>
      <td><label>
        <select name="zy" size="1" class="newInput" id="zy">
          <option selected="selected"><%= rs("zy") %></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=<%= rs("zxf") %> 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"><%= rs("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>

⌨️ 快捷键说明

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