?? login.jsp
字號:
<%@ page language="java" contentType="text/html; charset=UTF-8"
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" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html:html>
<head>
<style type="text/css">
<!--
.STYLE1 {
font-size: 18px;
font-weight: bold;
}
-->
</style>
<script type="text/javascript" language="javascript">
function isEmpty(id,div,label){
var eid = document.getElementById(id);
if(eid.value.length==0){
document.getElementById(div).innerHTML=label+"不能為空";
return false;
}
document.getElementById(div).innerHTML="";
return true;
}
function onSubmitCheck(){
var bUserName = isEmpty('username','usernameDiv','用戶名');
var bPassword = isEmpty('password','passwordDiv','密碼');
if(bUserName&&bPassword){
return true;
}
return false;
}
</script>
</head>
<body>
<p> </p>
<p> </p>
<p> </p>
<html:form action="/loginAction.do?u=admin" method="post" focus="username" onsubmit="return onSubmitCheck();">
<table width="744" height="129" border="1" align="center">
<tr>
<th colspan="3" scope="col"><span class="STYLE1">管理員登錄</span></th>
</tr>
<tr>
<td width="169">用戶名:</td>
<td width="212"><label>
<input type="text" name="username" id="username" onblur="isEmpty('username','usernameDiv','用戶名')"/>
</label></td>
<td width="341"><div id="usernameDiv" style="display:block;color:red"> </td>
</tr>
<tr>
<td>密碼:</td>
<td><label>
<input type="password" name="password" id="password" onblur="isEmpty('password','passwordDiv','密碼')"/>
</label></td>
<td><div id="passwordDiv" style="display:block;color:red"></div> </td>
</tr>
<tr>
<td colspan="3"><label>
<input type="submit" name="Submit" value="登錄" />
</label>
<label>
<input type="reset" name="Submit2" value="重置" />
</label></td>
</tr>
</table>
</html:form>
</body>
</html:html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -