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

📄 login.jsp

📁 jsp超市管理系统系统,是用经典的MVC设计模式开发的非常适合初学者学习。
💻 JSP
字号:
<%@ page contentType="text/html;charset=gbk"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>

<title>超市管理系统</title>
<script type = "text/javascript" src="../js/check.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
<!--
body {
	text-align:center;
	margin:0;
}
#container{
         background-image:url(../image/bj.jpg);
        background-repeat:no-repeat;
         width:800px;
         height:550px;
}
#table{margin:238px 0 0 25px;
         }

input{width:150px;
      height:13px;
      }
#radio{margin-top:-3px;}
#radio1{margin:0 1px 0 -50px;width:30px;height:15px;
}
#radio2{margin-left:-1px;width:30px;height:15px;}
#check1{width:120px;}
#check{width:35px;height:16px;margin:2px 10px 0 -20px;}
.submit1 input{margin:3px -400px 0 435px;width:45px;height:22px;float:left;}
-->
</style></head>

<body>
<div id="container">
	<form action="../Login"  name="login" method="post" id="form" onsubmit="return validate4();">
 	<div id="table">
 		<table>
    		<tr>
      			<td><input type="text" name="logname" id="name" tabindex="2" /></td>
    		</tr>
   			 <tr>
      			<td><input type="password" name="password" id="password" tabindex="2" /></td>
    		</tr> 
		</table>  
	</div>
	<div id="radio">
		<input name="status" type="radio" value="员工" id="radio1" checked/>
		<input name="status" type="radio" value="老板" id="radio2" />
	</div>
	<div id="check1">
		<input type="text" name="check" id="check" tabindex="2" maxlength="4"/>
		<image src="random.jsp" alt="看不清?点击更换" style="border: none; cursor: pointer;" onclick="this.src=this.src+'?'" height="20" width="47">
	</div>
	<div class="submit1">
  		<input name="submit" type="submit" value="登陆" />
	</div>
	<div class="submit1" id="submit2"> 
 		<input name="reset" type="reset" value="取消" />
 	</div>
	</form>
</div>
   <% 
  		String message = (String)session.getAttribute("error");
  		if(message != null){
   %>		
   	<form name="mesg" >
   			<input name="a" type="hidden" value="<%=message %>" />
   	</form>
   			<script type="text/javascript">
   			if(document.mesg.a.value=='验证码错误'){
   				alert("验证码错误");
   			}
   			else{
   			    alert("用户名或密码错误");
   			}
  	 		</script>
   <%
  		session.removeAttribute("error");
   	    }
   %>
</body>

</html>

⌨️ 快捷键说明

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