gpt4 book ai didi

javascript - 将参数从 javascript 传递到另一个 jsp

转载 作者:行者123 更新时间:2023-12-02 20:40:54 25 4
gpt4 key购买 nike

我想将参数从 Javascript 函数传递到另一个 JSP 页面。目前我正在这样做:

function viewapplet(strPerfMonPoint) {
var dateSelected = document.forms[0].hdnDateSelected.value;
document.forms[0].hdnPerfMonPoint.value = strPerfMonPoint;
var win;
win = window.open("jsp/PopUp.jsp?GraphPerfMon="+strPerfMonPoint+"&strDateSelected="+dateSelected, strPerfMonPoint,"width=800,height=625,top=40,left=60 resizable=No");
}

我添加了hdnPerfMonPoint隐藏变量,并尝试使用request.getparameter(hdnPerfMonPoint)访问PopUp.jsp,但它给出了null。

我想要我的 window.open 像:

window.open("jsp/PopUp.jsp", strPerfMonPoint,"width=800,height=625,top=40,left=60 resizable=No");   

请提出解决方案。

最佳答案

你引用得对吗? (并注意名称更改!)

String GraphPerfMon = request.getParameter("GraphPerfMon");

“参数的返回值为字符串。如果请求的参数不存在,则返回null值。”

关于javascript - 将参数从 javascript 传递到另一个 jsp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2476667/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com