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

相關文章
相關標籤/搜索