可采用iframe的JS調用父頁面的JS
如:父頁面的JS代碼為

1 function getValue() {
2 document.getElementById("MyFormLayer").style.display = "none";
3 var grid = document.getElementById("MainGrid");
4 if (grid != null) {
5 grid.style.display = "block"
6 }
7 var type = document.getElementById("IFRAME1").contentWindow.document.getElementById("TextBox1").value;//獲取框架頁面控件TextBox1的值,IFRAME1指框架ID
8 document.getElementById("TYPE").value = type;
9 document.getElementById("QUERY").click();//觸發父頁面QUERY按扭事件
10 }
框架頁的JS代碼為:
function returnPath() {
parent.window.getValue();
}