子ウィンドウの親ウィンドウからjavascript関数を実行したい
例
私は別のウェブサイトに言わなければなりませんsite1.com
そしてsite2.com
site1.com
URLの新しいウィンドウを開きたいsite2.com
new_window = window.open("site2.com/index.php", "window2");
test()
次に、このnew_windowでjs関数を実行したいと思います。
// Where site2.com/index.php
<html>
......
</html>
<script>
function test(){
// some code here
}
</script>
概要
新しいウィンドウ(子)を開き、親ウィンドウからいくつかのJS関数を実行したい。