比如這樣一個urlhttp://localhost:8080/demo/hello.jsp?a=hello&b=ni#hao這時在jsp頁面上String a = request.getParameter("a");String b = request.getParameter("b");a的值沒問題,a="hello"但是b的值為 b="ni", 后面的"#hao"都不見了,為什么呢?如果我想獲得完整的參數"ni#hao"應該怎樣做呢?因為我獲得這個參數是要根據"#"為分界符號解析有用的。謝謝!String url = "http://localhost:8080/demo/hello.jsp?a=hello&b=ni\#hao ";加了轉義字符\后整個String就錯了……
添加回答
舉報
0/150
提交
取消