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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

為什么我這個(gè)點(diǎn)提交根本就沒(méi)反應(yīng)

這個(gè)是表單的代碼

<%@ 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 'user.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>用戶注冊(cè)</h1>

? ? <hr>

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

? ? <table>

? ? <tr>

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

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

? ? </tr>

? ? <tr>

? ? <th>愛好:</th>

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

? ? <td><input type="checkbox" name="favorite" value="music"/>音樂(lè)</td>

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

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

? ? </tr>

? ? <tr>

? ? <td colspan='2'><input type="button" value="提交" /></td>

? ? </tr>

? ? </table>

? ? </form>

? </body>

</html>

這個(gè)是request的代碼

<%@ page language="java" import="java.util.*" contentType="text/html; charset=GBK"%>

<%

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)置對(duì)象</h1>

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

? ? 愛好:<%

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

? ? if(favorites!=null)

? ? {

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

? ? {

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

? ? }

? ? }

? ? ?%>

? </body>

</html>

完全跟老師的一樣,為啥點(diǎn)提交沒(méi)有反應(yīng),求大神解答

正在回答

1 回答

input里的type="button"改成submit 試試。

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

舉報(bào)

0/150
提交
取消

為什么我這個(gè)點(diǎn)提交根本就沒(méi)反應(yīng)

我要回答 關(guān)注問(wèn)題
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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