【发布时间】:2014-05-28 19:55:54
【问题描述】:
我在 html 页面中有以下表单
<form name="input" action="sayHello1.jsp?param1=test1" method="get">
Username: <input type="text" name="user">
<input type="submit" value="Submit">
</form>
我在文本框中输入值“test”并提交。
我希望在浏览器中看到提交的 URL
http://localhost:8080/helloWorld/sayHello1.jsp?param1=test1&user=test
但我将网址视为
http://localhost:8080/helloWorld/sayHello1.jsp?user=test
为什么会这样?
【问题讨论】:
-
你用的是什么浏览器?这与 Java 无关。
-
无论如何我都会使用隐藏值,但这并不能回答问题。
标签: web-applications browser httprequest get-request