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

📄 pub.jsp

📁 这是一个在线教育系统
💻 JSP
字号:
<%@ include file="conn.jsp"%>
<%String adminvalue="admin",teacher="",fenlei1="",fenlei2="";%>
<%@ include file="isteacher.jsp"%>
<%@ include file="fenlei.jsp"%>

<html>
<head>
<script language="javascript">
<!--
function isok(theform)
{
if (theform.teacher.value.length<2 || theform.teacher.value.length>20)
  {
    alert("教师名称最少要2位,最多20位!");
    theform.teacher.focus();
    return (false);
  }

if (theform.course.value=="")
  {
    alert("课程名称没填呢!");
    theform.course.focus();
    return (false);
  }
if (theform.title.value=="")
  {
    alert("资料标题没填呢!");
    theform.title.focus();
    return (false);
  }
if (theform.fileurl.value=="")
  {
    alert("你资料地址没填呢!");
    theform.fileurl.focus();
    return (false);
  }


if (theform.filesize.value=="")
  {
    alert("你资料大小没填呢!");
    theform.filesize.focus();
    return (false);
  }
  if (theform.content.value=="")
  {
    alert("资料简介没填呢!");
    theform.content.focus();
    return (false);
  }
   
return (true);
}
-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE>TD {
	FONT-SIZE: 9pt; LINE-HEIGHT: 140%
}
BODY {
	FONT-SIZE: 9pt; LINE-HEIGHT: 140%
}
A:link {
	COLOR: #0033cc; TEXT-DECORATION: none
}
A:visited {
	COLOR: #0033cc; TEXT-DECORATION: none
}
A:active {
	COLOR: #ff0000; TEXT-DECORATION: none
}
A:hover {
	COLOR: #000000; TEXT-DECORATION: underline
}
.header	{
font-family: Tahoma, Verdana; font-size: 9pt; color: #FFFFFF; background-color: #69C37C
}
.category{
font-family: Tahoma, Verdana; font-size: 9pt; color: #000000; background-color: #EFEFEF
}
</STYLE>
<title>发布资料</title>
<script language="javascript">
function submitonce(theform)
{
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}
</script>
</head>
<body text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0 >
<br>
<form action="pubok.jsp" method="post" onsubmit="return isok(this)">
  <table style="BORDER-COLLAPSE: collapse" borderColor=#808080 width="480" border="1" align="center" cellpadding=1>
    <tr>
      <td align="center" class="header" colspan=2>发布资料</td>
    </tr>
    <tr> 
      <td align="center">教师姓名</td>
      <td>&nbsp;
        <input type=text name="teacher" size=15 value="<%=teacher%>">
      </td>
    </tr>
    <tr> 
      <td align="center">课程名称</td>
      <td>&nbsp;
        <input type=text name="course" size=15>
        (为方便查找,请各教师注意尽量统一名称)</td>
    </tr>
    <tr> 
      <td align="center">资料标题</td>
      <td>&nbsp;
        <input type=text name="title" size=52>
      </td>
    </tr>
    <tr> 
      <td align="center">资料地址</td>
      <td>&nbsp;
        <input type=text name="fileurl" size=52>
        <br>
        &nbsp;(如资料链接自其他网站,请自行填写链接地址) </td>
    </tr>
    <tr> 
      <td align="center">资料大小</td>
      <td>&nbsp;
        <input type=text name="filesize" size=15>
        K</td>
    </tr><tr>
    <td align="center">资料类型</td><td>
    <%sql="select * from scott.type "; 
 rs=stmt.executeQuery(sql); 
%>
    &nbsp;<select name="type">
   
    <%
while(rs.next()){
%>
    <option value="<%=rs.getString("typeid")%>"><%=rs.getString("type")%></option>
    <%
}
out.print("</select>");

%></td></tr><tr><td align="center">资料简介</td><td>&nbsp;<textarea name="content" cols="51" rows="6"></textarea></td></tr>
  </table>
<center><br><input type=submit name="submit" value="发布">&nbsp;&nbsp;<input type=reset name="reset" value="清空"></center>
</form>
</body>
</html>

⌨️ 快捷键说明

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