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

📄 modify.jsp

📁 中学教学管理系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改信息</title>
</head>
<body>
<script language="javascript">
  function check(){//标题内容不能为空
    if(form1.user.value.length>10){
	    alert("标题不能超过10个字!");
		document.form1.user.focus();
		return false;
	}else if(document.form1.sel.value==""||document.form1.sel.value==null){
	    alert("没有信息可修改,请关闭本页面!");
		document.form1.user.focus();
		return false;
	}else if(document.form1.user.value==""||document.form1.user.value==" "){
	    alert("标题不能为空!");
		document.form1.user.focus();
		return false;
	}else if(document.form1.content.value==""||document.form1.content.value==" "){
	    alert("资源信息不能为空");
		document.form1.content.focus();
		return false;
	} 
  }
</script> 
<form method="POST" action="ok_modify.jsp" name="form1" onsubmit="return check()">
<table width="100%"  border="1">
  <tr bgcolor="#00CCFF">
    <td colspan="2"><div align="center">
      <h1>修改教学资源信息</h1>
    </div></td>
  </tr>
  <tr>
    <td width="19%">请在右侧表格内选择要修改信息的编号并填写修改内容</td>
    <td width="81%"><div align="center">
      <p>序号:
	  <select name="sel" size=1>
	  <%@ page language="java" import="java.io.*"%>
	  <%  try{
	     	  String address = application.getRealPath("sourceofteach");
              RandomAccessFile ct = new RandomAccessFile(address+"/"+"content.txt","rw");
	          int i=0;
		      while(ct.readLine() != null){
		          i++;
			      out.print("<option value=\""+i+"\">"+i+"</option>");
		      }
		      ct.close();
			}catch(Exception e){}
		%>
		</select>
      </p>
      <p>标题: </p>
      <p>
        <input type="text" name="user" size="20">
      </p>
      <p>教学资源信息:</p>
      <p>
        <textarea name="content" cols="60" rows="10"></textarea>
</p>
      <p>请注意修改信息的序号!!!</p>
      <p>
        <input name="submit" type="submit" value="确定">
      &nbsp;&nbsp;
        <input name="reset" type="reset" value="重写">
      &nbsp;&nbsp;
        <input name="button" type="button" onClick="javascript:window.close();" value="取消">
      </p>
    </div></td>
  </tr>
</table>

</body>
</html>

⌨️ 快捷键说明

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