<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
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 'login.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 Login(){
var form = document.forms[0];
form.action = "<%=basePath%>user/login";
form.method = "post";
form.submit();
}
</script>
</head>
<body>
<form action="" name="loginForm">
用户名:<input type="text" name="username" id="username"
placeholder="请输入账户" required="required"/>
<font color="red">${unameErr }</font>
<br/>
密 码:<input type="password" name="pwd" id="pwd"
placeholder="请输入密码" required="required"/>
<font color="red">${pwdErr }</font>
<br/>
<input type="button" value="登录" onclick="Login()"/>
</form>
</body>
</html>
java中如何设计登录页面 java制作登录页面
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
html5可以控制元素为块级元素的取值
html标签(也叫元素)大概可以统分为三大类,块元素、内联元素、内联块元素。 块元素 1,常用的块元素:ul、li、div、p、dl、dt、dd、h1~h6。 2,块元素支持所有的样式。 3,盒子独占据一行,即使设置了宽度。 &n
html5可以控制元素为块级元素的取值 块元素 内联元素 html