第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

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

用戶名為null

這是reg:

<%@ page language="java" import="java.util.*" contentType="text/html; charset=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 'index.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">

-->

? </head>

??

? <body>

? ? <h1>用戶注冊</h1>

? ? <hr>

? ? <form name = "regForm" action = "request.jsp" method= "post">

? ? <table>

? ? ?<tr>

? ? ? <td>用戶名:</td>

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

? ? ?</tr>

? ? ?<tr>

? ? ? <td>愛好:</td>

? ? ? <td>

? ? ? ?<input type = "checkbox" name = "favorite" value = "read">讀書

? ? ? ?<input type = "checkbox" name = "favorite" value = "movie">電影

? ? ? ?<input type = "checkbox" name = "favorite" value = "music">音樂

? ? ? ?<input type = "checkbox" name = "favorite" value = "internet">上網(wǎng)

? ? ? </td>

? ? ?</tr>

? ? ?<tr>

? ? ? <td colspan ="2"><input type = "submit" value = "提交">

? ? ? </td>?

? ? ?</tr>

? ? </table>

? ? </form>

? ? <br>

? ? <br>

? ? <a href="request.jsp?username=lisi">測試url傳參數(shù)</a>?

? </body>

</html>

--------------------------------------------------------------------------------------

這是request:

<%@ page language="java" import="java.util.*" contentType="text/html; charset=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 'index.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">

-->

? </head>

??

? <body>

? ? <h1>request內(nèi)置對象</h1>

? ? <%

? ? ?request.setCharacterEncoding("utf-8") ;

? ? %>

? ? ? ? ? ? ? ? ? ? ?用戶名:<%=request.getParameter("username")%><br>

? ? ? ? ? ? ? ? ? ? ?愛好:<%

? ? ? ? ? ? ? ? ? ?if(request.getParameterValues("favorite")!=null)

? ? ? ? ? ? ? ? ? ?{

? ? ? ? ? ? ? ? ? ?String[] favorites = request.getParameterValues("favorite");

? ? ? ? ? ? ? ? ? ?for(int i =0;i<favorites.length;i++)

? ? ? ? ? ? ? ? ? ?{

? ? ? ? ? ? ? ? ? ? ?out.println(favorites[i]+"<br>"+"&nbsp;&nbsp");

? ? ? ? ? ? ? ? ? ?}

? ? ? ? ? ? ? ? ? ?}

? ? ? ? ? ? ? ?%>

? ? ?

? </body>

</html>


正在回答

3 回答

我也是名字為null


0 回復(fù) 有任何疑惑可以回復(fù)我~

我看一下 代碼應(yīng)該是對的呀。。。。。我的可以

<%

? ?request.setCharacterEncoding("utf-8");

? //解決用戶信息用中文是的亂碼,但是無法解決url傳遞參數(shù)亂碼問題

? request.setAttribute("password","miaomiao");

? %>

? 用戶名:<%=request.getParameter("username") %><br>

? 愛好:<%

??

? String[] favorite=request.getParameterValues("favorite");

? for(int i=0;i<favorite.length;i++)

? {

?out.println(favorite[i]+"&nbsp;&nbsp;");

? }

?

? %>


0 回復(fù) 有任何疑惑可以回復(fù)我~

中文名字可以 而且沒出現(xiàn)亂碼

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號