<iframe src="VideoController.do?videoPlay" name="topFrame" ></iframe>
topFrame 是父級頁面iframe的name屬性
1、父級頁面調用子級頁面
(1)父級頁面調用子級頁面方法
topFrame.window.子級頁面方法();
(2)父級頁面調用子級頁面屬性 獲取值、顯示隱藏、變量
topFrame.window.document.getElementById("back").style.display="block";
topFrame.window.document.getElementById("back").innerText;
topFrame.window.document.getElementById("back").value;
topFrame.window.cId;
2、子級頁面調用父級頁面
(1)子級頁面調用父級頁面方法
window.parent.父級頁面方法();
(2)子級頁面調用父級頁面屬性 獲取值、顯示隱藏、變量
twindow.parent.document.getElementById("PtzPreset1").style.display="block";
window.parent.document.getElementById("PtzPreset1").innerText;
window.parent.document.getElementById("back").value;;
window.parent.cId;