(1)子のページは、親ページの方法または変数を呼び出します。
window.parent.method()または変数名
window.parentは、親ページにコードを書くのと同じ操作を書くことと同じです
window.parent.aa(); // aa関数window.parent.bbを呼び出す:// bb変数を呼び出す例:サブページwindow.parent。$( "#aaa")。 // JSライティング方法
(2)親ページは子のページを取得します
主に、ContentWindowを介してサブページを見つけることです
document.getElementById("childframe").contentWindow.childtest();//Writing method of js in the child page var childWindow = $("#addFrame")[0].contentWindow;//Get the object childWindow.formSubmit();//Writing method of jquery in the child page //Note: where both childframe and addFrame are id of the iframe上記の記事では、JS Neutronページの親ページメソッド変数の相互の呼び出しについて簡単に説明します。私があなたと共有するすべてのコンテンツです。私はそれがあなたに参照を与えることができることを願っています、そしてあなたがwulin.comをもっとサポートできることを願っています。