?? 2091b832d918001e1aa3f6da0f9d7068
字號:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%
String path2 = request.getContextPath();
String basePath2 = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path2+"/";
String errors=(String)request.getAttribute("errors");
String userName=(String)session.getAttribute("userName");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath2%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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">
-->
</head>
<script language="JavaScript" type="text/JavaScript">
function validatefun(){
//用戶輸入名的驗(yàn)證
if(document.form1.userName.value==""){
alert("請輸入您的用戶名!");
return false;
}
if(document.form1.passWord.value==""){
alert("請輸入您的密碼!");
return false;
}
return true;
}
</script>
</head>
<body>
<%if(userName==null){ %>
<form name="form1" method="post" action="CustomerLoginServlet" onSubmit="return validatefun();">
<table width="250" border="0" cellspacing="0" cellpadding="0" id="border">
<tr> </tr>
<tr>
<td>用戶名 :
<input type="text" name="userName" size="20" maxlength="28"></td>
<td><br></td>
</tr>
<tr>
<td>密 碼 :
<input type="password" name="passWord" size="20" maxlength="28">
<br></td>
<td>
<br></td>
</tr>
<%if(errors!=null){ %>
<tr><td colspan=2><font color="ff0000"><%=errors%></font></td></tr>
<%} %>
<tr>
<td colspan="2">
<div align="left">
<input type="submit" name="Submit" value="登錄">
<input type="reset" name="Reset" value="重置">
<a href="foreplat/customerRegist.jsp">新用戶注冊</a></div></td>
</tr>
<!-- <input type="hidden" name="method" value="userLogin"/> -->
</table>
</form>
<%}else{ %>
<table width="250" border="0" cellspacing="0" cellpadding="0" id="border">
<tr>
<td colspan="2">歡迎您!<font color="ff0000"><%=userName %></font></td>
</tr>
<tr>
<td width="47%"><a href="userOrder.jsp" class="blue2">訂單管理</a></td>
<td width="53%"><a href="userCar.jsp" class="blue2">購物車管理</a></td>
</tr>
<tr>
<td><a href="userInfo.jsp" class="blue2">信息管理</a></td>
<td><a href="logout.jsp" class="blue2">安全退出</a></td>
</tr>
</table>
<%} %>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -