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

📄 mod_zhuanye.asp

📁 网络教学管理系统
💻 ASP
字号:
<!--#include file = "inc/conn.asp" -->
<!--#include file = "CheckLogin.asp" -->
<!--#include file = "inc/zhuru.asp" -->
<%
	Dim rs ,strSql ,strId
	strID = request.QueryString("ID")
	If strID & "" = "" Then
		Response.Write("参数错误!")
		Response.End
	End If
	
	Dim strName ,strSchoolID , strZhuanyeID ,strMainTeacher
	strSql = "SELECT * FROM Zhuanye WHERE ID = "& strID
	Set rs = Server.CreateObject("ADODB.RecordSet")
	rs.open strSql,conn,1,1
	If not rs.EOF Then
		strName = rs("Name").value
		strSchoolID = rs("SchoolID").value
		rs.close

%>
<style type="text/css">
<!--
.STYLE1 {
	font-size: 16px;
	font-weight: bold;
	color: #006600;
}
.STYLE9 {color: #003300; font-size: 14px; }
body,td,th {
	font-size: 12px;
}
-->
</style>
<SCRIPT language=JavaScript>
	function CheckValue(thisform)
	{

		if (thisform.Name.value.length == 0){
		alert ('请输入专业名。');
		}
		
		if (thisform.Name.value.length > 80){
		alert ('专业名过长。');
		}

		else {
		
		
			thisform.submit();
		}
	}
	</SCRIPT>
<body bgcolor="#B1DB99" topmargin="5" leftmargin="5">

<table width="355" border="0" align="left">
  <form id="form1" name="form1" method="post" action="ModZhuanye.asp?ID=<%=strID%>" onSubmit="CheckValue(this);return false">
  <tr bgcolor="#66C06D">
    <td colspan="2" background="images/Down_bg.gif">专业信息</td>
    </tr>
  <tr bgcolor="#66C06D">
    <td width="94"><div align="right"><span class="STYLE9">专业名:</span></div></td>
    <td width="251">
      <label>
        <input type="text" name="Name" value=<%=strName%> />
        </label>    </td>
  </tr>
  <tr bgcolor="#66C06D">
    <td height="17"><div align="right"><span class="STYLE9">所属学院:&nbsp;</span></div></td>
    <td><select name="SchoolID">
	<%
	strSql = "SELECT * FROM School ORDER BY Name ASC"
	rs.open strSql,conn,1,1
	%>
	<%
			Do While Not rs.EOF
	%>
			<option value="<%=rs("ID").Value%>" <%If rs("ID").value = strSchoolID Then%> selected="selected" <%End If%>><%=rs("name").Value%></option>
	<%
			rs.movenext
			loop
			rs.close
	%>
     </select>
    </select>    </td>
  </tr>
  <tr bgcolor="#66C06D">
    <td height="18" colspan="2" align="center">
        <input name="清空" type="reset"  value="清空" />&nbsp;&nbsp;
        <input type="submit" name="Submit" value="修改"  /></td>
  </tr>   
    <tr bgcolor="#66C06D">
    <td colspan="2" background="images/Top_bg.gif">&nbsp;</td>
    </tr>
   </form>
</table>

<%
	Else
		Response.Write("参数错误")
		Response.End
	End If

%>

⌨️ 快捷键说明

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