父頁面(JSP頁面)傳參數到子頁面(JSP頁面)
1、父頁面傳參數到子頁面
//JavaScript代碼 $.ajax({ type:"POST", uri:"../student/studentInfo.action", data:{ "date":date, "stuNo":stuNo }, success:function(data){ var params = "?date="+date+"&stuNo="+stuNo; var action = '../../page/studentInfo.jsp?'+params; dojo.byId("student").src = action; } });
<iframe src="../../page/studentInfo.jsp" id="student" ></iframe>
var params = { 'date':'{param.date}', 'stuNo':{param.stuNo} };