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

📄 login.jsp

📁 jsp bbs + servlet jiu shizhe xie le
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=GBK"
    pageEncoding="GBK"%>
<!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=GBK">
<title>用户登录</title>

<script type="text/javascript">

	function login(){
		if(document.forms.form1.userno=="" || document.forms.form1.password.value==""){
			alert( "用户名或密码不能为空!" );
			return;
		}
		document.forms.form1.action="login";
		document.forms.form1.submit();
	}
	
	
	function register(){
		window.self.location="register.jsp";
	}
	
</script>
</head>
<body>
 <h3>用户登录</h3><hr>
 <div align="center">
 	    <%if(request.getAttribute("message")!=null){%>
			<font color="#ff0000"><%=request.getAttribute("message")%></font><hr>
		<%}%>
	 <form  method="get" id="form1">
	 <table width="185" height="88">
	 	<tr><td>用户:</td><td><input type="text" name="userno" size="14" ></td></tr>
	 	<tr><td>密码:</td><td><input type="password" name="password" size="14"></td></tr>
	 </table>    
	  <table width="185" height="88">
	 	<tr>
		   <td align="right"><input type="button" value="登录" onclick="login()"  style="background-color: rgb(192, 192, 192);"></td>
		   <td align="left"><input type="button" value="注册" onclick="register()"  style="background-color: rgb(192, 192, 192);"></td>
	    </tr>
	 </table>      
	 </form>  
 </div>
</body>
</html>

⌨️ 快捷键说明

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