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

📄 entry.jsp

📁 用java+servlet实现在线考试系统
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'Entry.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
<script type="text/javascript">
   function checkinput()
   {   
       var stunum = document.forms[0].textfield.value;
       var stuname=document.form1.textfield2.value;
       if(stunum=="")
       {  
          window.alert('考号不能为空!');
          document.forms[0].textfield.focus();
          return false;
       }
       if(stuname=="")
       {  
          window.alert('姓名不能为空!');
          document.forms[0].textfield2.focus();
          return false;
       }
      return ;
   }
 
 </script>	
<%
   String flag=request.getParameter("flag");
    if(flag!=null)
     {
        if(flag.equals("success"))
        {
   %>
           <script>
           alert("用户不存在!");
           </script>
   <% 
       }
     }
 %>	
 
 
<style type="text/css">
<!--
.STYLE1 {
	font-family: "楷体_GB2312";
	font-size: 16px;
	font-weight: bold;
}
-->
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="stuentryservlet" onSubmit="return checkinput();">
  <table width="618" border="0" align="center">
    <tr>
      <td colspan="7"><input type="image" name="imageField" src="image/zte.jpg" /></td>
    </tr>
    <tr>
      <td height="56" colspan="7">&nbsp;</td>
    </tr>
    <tr>
      <td width="5" align="center">&nbsp;</td>
      <td width="35" height="26" align="right"><input type="image" name="imageField2" src="image/samll.jpg" /> </td>
      <td width="101" align="center"> <span class="STYLE1">考生考号:</span></td>
      <td width="108"><input type="text" name="textfield" size=14 /></td>
      <td width="27" align="right"><input type="image" name="imageField3" src="image/samll.jpg" /></td>
      <td width="98" align="center"><span class="STYLE1">考生姓名:</span></td>
      <td width="214"><input type="text" name="textfield2" size=14/></td>
    </tr>
    <tr>
      <td height="44">&nbsp;</td>
      <td colspan="6">&nbsp;</td>
    </tr>
    <tr>
      <td height="46" colspan="7" align="center"><input type="submit" name="Submit" value="提&nbsp;&nbsp;交" />
      <input type="reset" name="Submit2" value="重&nbsp;&nbsp;置" /></td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

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