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>
2、子頁面接受父頁面的參數
復制代碼 代碼如下:
var params = {
'date':'{param.date}',
'stuNo':{param.stuNo}
};