在第一个jsp页面用javascript打开有frameset的窗口:
<script language="javascript">
function OpenUp()
{
var ReturnVal,strId;
strId=document.getElementById("form1:mystring").value;
if(strId!=null)
{
ReturnVal=window.showModalDialog("page1.jsp?id="+strId,"","");
}
}
}
</script>
在page1.jsp里:
<html>
<head>
<title>jsp </title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<frameset rows="4%,96%" border="0" framespacing="0" frameborder="0">
<frame src="about:blank" scrolling="no">
<frame src="page2.jsp?id=我要传的strId">
</frameset>
</html>
<frame src="page2.jsp?id=我要传的strId">
这里怎么写,才能把我的参数传给page2.jsp?
问题补充:
解决办法:
<%
String strId = request.getParameter("id");
%>
<frameset rows="4%,96%" border="0" framespacing="0" frameborder="0">
<frame src="about:blank" scrolling="no">
<frame src="page2.jsp?id= <%=strId%>">
</frameset>

javascript 向frameset传递参数
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-