亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

靜態頁面登錄的完整內容

問下老師,第一個靜態頁面的完整內容??

正在回答

3 回答

<%@?page?language="java"?contentType="text/html;?charset=utf-8"
	import="java.net.*"
????pageEncoding="utf-8"%>
<!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=utf-8">
<title>用戶登錄</title>
</head>
<body>
	<h1>用戶登錄</h1>
	<hr>
		<%
		request.setCharacterEncoding("utf-8");
		String?username?=?"";
		String?password?=?"";

		Cookie[]?cookies?=?request.getCookies();
		if(cookies!=null?&&?cookies.length>0){
			for(Cookie?c:cookies){
				if(c.getName().equals("username")){
					username?=?URLDecoder.decode(c.getValue(),"utf-8");
				}
				if(c.getName().equals("password")){
					password?=?URLDecoder.decode(c.getValue(),"utf-8");
				}
			}
		}
	%>
	<form?name="loginForm"?action="doLogin.jsp"?method="post">
		<table>
			<tr>
				<td>username</td>
				<td><input?type="text"?name="username"?value=<%=username%>></input></td>
			</tr>
			<tr>
				<td>password</td>
				<td><input?type="password"?name="password"?value=<%=password%>></input></td>
			</tr>
			<tr>
				<td>
					<input?type="checkbox"?name="isUseCookie"?checked="true"/>記住登錄狀態
				</td>
			</tr>
			<tr>
				<td?colspan="2"?align="center"><input?type="submit"?value="submit"/></td>
			</tr>
		</table>
	</form>
</body>
</html>


0 回復 有任何疑惑可以回復我~

<form action="dologin.jsp" name="用戶信息登錄" method="post">

<table>

<tr>

<td>用戶名:</td>

<td><input type="text" name="username"></td>

</tr>

<tr>

<td>密碼:</td>

<td><input type="password" name="password"></td>

</tr>

<tr>

<td colspan="2"><input type="checkbox" name="isUseCookie" checked="checked" />十天內記住我的登錄狀態</td>

</tr>

<tr>

<td colspan="2" align="center"><input type="submit" value="登錄"><input type="reset" value="取消"></td>

</tr>

</table>

</form>



表單中應該是這些~后面有一個頁面有這些東西的答案~其實 你還可以 直接下載 老師的代碼。。。

0 回復 有任何疑惑可以回復我~

我想了一會兒,猜出了代碼,謝謝。。<form name="loginForm" action="dologin.jsp"method="post"/>
<table>
?? <tr>
?? <td>用戶名:</td>
?? </tr>
?? <tr>
??? <td><input name="username"type="text"value=""/></td>
??? </tr>
?? <tr>
?? <td>密碼:</td>
?? </tr>
?? <tr>
?? <td><input name="password"type="password"value=""/></td>
?? </tr>
?? <tr>
?? <td? colspan="2"><input type="checkbox"name="isUserCookie" checked="checked">10天內記住我的登錄狀態</td>
?? </tr>
?? <tr>
?? <td? colspan="2"align="center">? <input type="submit"value="登錄"/><input type="reset" value="取消"/>
?? </tr>
</table>
??

1 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

靜態頁面登錄的完整內容

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號