ポップアップ ウィンドウを作成しましたが、その中で親ウィンドウで作成した関数を使用したいと考えています。window.opener.parentFunction() を使用してみましたが、役に立ちました。他の誰かがこの問題を経験しましたか? 私のコードは次のようになります。
function parentFunction(){
alert('testing');
}
function print(){
var new_win = window.open('','name','height=400,width=500');
var output = "<html><head></head><body><table>\n";
for (i = 0; i < 10; i++) {
output += "<td onclick='window.opener.parentFunction()'>"+i+"</td>";
}
output += "</table></body></html>\n";
new_win.document.write(output);
}
*動作しました。みんなありがとう。