咋样用window.open 传递参数? 10
从page01页传递一个变量aa到page02页:<%Stringmeb=response.encodeURL("page02.jsp");%><SCRIPTLANGUA...
从page01页传递一个变量aa到page02页:
<% String meb=response.encodeURL("page02.jsp");%>
<SCRIPT LANGUAGE="javascript">
<!--
function go(){ window.open ("<%= meb %>?aa","")}
-->
</SCRIPT>
接收页:
<head>
<%String a=request.getParameter(aa);%>
page页出错信息:
D:\tomcat\work\DEFAULT\ROOT\page01.java:59: Method getParamenter(java.lang.String) not found in interface javax.servlet.http.HttpServletRequest.
String a=request.getParamenter(aa);
^
D:\tomcat\work\DEFAULT\ROOT\page02.java:59: Variable aa may not have been initialized.
String a=request.getParamenter(aa);
^
高手们我的分不多请帮帮忙吧!!!
问题补充:我是从网上学的(照猫画虎行不通阿!):
javascript中window.open可以用这种方法传参数!
例如:window.open("abc.jsp?a=1&b=2")
abc.jsp中接收数据是request.getParamenter(a)
我的接收写错了? 展开
<% String meb=response.encodeURL("page02.jsp");%>
<SCRIPT LANGUAGE="javascript">
<!--
function go(){ window.open ("<%= meb %>?aa","")}
-->
</SCRIPT>
接收页:
<head>
<%String a=request.getParameter(aa);%>
page页出错信息:
D:\tomcat\work\DEFAULT\ROOT\page01.java:59: Method getParamenter(java.lang.String) not found in interface javax.servlet.http.HttpServletRequest.
String a=request.getParamenter(aa);
^
D:\tomcat\work\DEFAULT\ROOT\page02.java:59: Variable aa may not have been initialized.
String a=request.getParamenter(aa);
^
高手们我的分不多请帮帮忙吧!!!
问题补充:我是从网上学的(照猫画虎行不通阿!):
javascript中window.open可以用这种方法传参数!
例如:window.open("abc.jsp?a=1&b=2")
abc.jsp中接收数据是request.getParamenter(a)
我的接收写错了? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询