<!--
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<html:base />
<title>login.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<script type="text/javascript">
String.prototype.Trim=function()
{
return this.replace(/(^/s*)|(/s*$)/g,"");
}
function login()
{
var userName=document.getElementsByName("user.userName")[0].value;
var userPwd = document.getElementById("user.userPwd").value;
if(userName.Trim() == ""){
alert("用户名不能为空");
document.getElementById("user.userName").focus();
return false;
}
if(userPwd.Trim() == ""){
alert("用户密码不能为空");
document.getElementById("user.userPwd").focus();
return false;
}
document.forms[0].action="login.do?method=login";
document.forms[0].submit();
}
</script>
<body>
<div align="center">
${errUserName }
${errUserPwd}
<br><html:form action="login.do" method="post">
<table>
<tr>
<td>用户名:<br></td>
<td>
<html:text property="user.userName" />
<br></td>
</tr>
<tr>
<td>用户密码:<br></td>
<td>
<html:password property="user.userPwd" />
<br></td>
</tr>
<tr>
<td colspan="2" align="center">
<html:button property="btnLogin" value="登录" οnclick="login()"/>
<br></td>
</tr>
</table>
</html:form>
</div>
</body>
</html:html>
-->
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<html:base />
<title>login.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<script type="text/javascript">
String.prototype.Trim=function()
{
return this.replace(/(^/s*)|(/s*$)/g,"");
}
function login()
{
var userName=document.getElementsByName("user.userName")[0].value;
var userPwd = document.getElementById("user.userPwd").value;
if(userName.Trim() == ""){
alert("用户名不能为空");
document.getElementById("user.userName").focus();
return false;
}
if(userPwd.Trim() == ""){
alert("用户密码不能为空");
document.getElementById("user.userPwd").focus();
return false;
}
document.forms[0].action="login.do?method=login";
document.forms[0].submit();
}
</script>
<body>
<div align="center">
${errUserName }
${errUserPwd}
<br><html:form action="login.do" method="post">
<table>
<tr>
<td>用户名:<br></td>
<td>
<html:text property="user.userName" />
<br></td>
</tr>
<tr>
<td>用户密码:<br></td>
<td>
<html:password property="user.userPwd" />
<br></td>
</tr>
<tr>
<td colspan="2" align="center">
<html:button property="btnLogin" value="登录" οnclick="login()"/>
<br></td>
</tr>
</table>
</html:form>
</div>
</body>
</html:html>