JSP专题:实现简单登录操做

转载请注明出处:http://blog.csdn.net/feng1790291543
javascript


jsp的系统,是去年才开始作的,可是项目经验和编码能力方面还有些欠缺,不过简单的实现了这个在线考试系统,功能简单,也不是很复杂,基本就是两层架构的开发——”javabean+jsp“,很少说了~有图有真相,出示登录界面:css


<html>
<head>
    <base href="<%=basePath%>">
    
    <title>登陆</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">
        <script language="javascript">
		function check()
		{
			if((document.login.user.value)=='')
			{
				window.alert('用户名称不能为空,请输入用户名');	
				document.login.user.focus();
				return false;
			}else if((document.login.psd.value)=='')
			{
				window.alert('密码不能为空,请输入密码');
				document.login.psd.focus();
				return false;
			}else 
			{
				return true;
			}
		}
	
	   </script>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <style type="text/css">
  #apDiv1 {
	position: absolute;
	left: 591px;
	top: 129px;
	width: 463px;
	height: 389px;
	z-index: 1;
}
  #apDiv2 {
	position: absolute;
	left: 34px;
	top: 120px;
	width: 295px;
	height: 283px;
	z-index: 2;
}
  body {
	background-color: #0aa;
}
  .d {
	font-size: 36px;
}
.STYLE2 {font-size: x-large}
  </style>
  <link href="../../dream/chenfeng/CSS/a_tag_effects.css" rel="stylesheet" type="text/css">
  <style type="text/css">
<!--
.STYLE3 {font-size: 36px; font-style: italic; }
.STYLE5 {
	color: #00FF66;
	font-family: "新宋体";
}
-->
  </style>
</head>
  <SCRIPT Language = javascript>
 <!--
  function isValid()
  {	
  	if(nameform.id.value == "")
  	{	
  		window.alert("您必须完成账号的输入!"); 
 		document.isValid.elements(0).focus();	
  		return  false;
  	}
  	
  	if(nameform.password.value == "")
  	{
  		window.alert("您必须完成密码的输入!");
  		document.isValid.elements(1).focus();
  		return  false; 
  	}
  	nameform.submit(); 
 }
 
  -->
  </SCRIPT>

<body>
<center>
     <h6 align="center"><img src="resource/school/2.jpg" width="60" height="60"></th>
     <span class="STYLE3"><font color="blue">北方民族大学</font><font size=2 color="blue"></span><span class="STYLE2">
       </th>
       </span>       
   <span class="STYLE2 STYLE5"><font size=6>公务员模拟考试管理系统</font></span><font size=6 color="red"><br>
  </font></h6>
<table width="609" height="337" border="1">
       <tr>
         <th width="366" height="331" scope="col"><img src="resource/school/5_t.jpg" width="343" height="258"></th>
         <th width="227" scope="col"> 
           <form action="login_check.jsp" method="post">
          <!-- <form action="servlet/check" method=post name="nameform" onSubmit="return isValid(this);">-->
         
             <p> </p>
           <p>用户名:
             <input type="text" name="id" value="" size="15" maxlength="18" >
                 <br>
                 <br>
             </p>
           <p>密码:  
       <input type="password" name="password" value="" size="15" >
                 <br>
                 <br>
             </p>
          
             </p>
      
<input name=b1 type="submit" value="肯定">
 
           <input name=b2 type="reset" value="重置">
           </form>
        
           </th>
          
       </tr>
     </table>
     
</center>  
 
</body>
</html>

还在改善当中,还缺乏随机的验证码和其余异常的捕捉的问题仍没有解决,可是这个能够基本使用的。

所有系统资源在:http://download.csdn.net/detail/feng1790291543/6992615
html

相关文章
相关标签/搜索