首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

JS 在open打开的窗口中调用父页面JS步骤

2012-10-31 
JS 在open打开的窗口中调用父页面JS方法父窗口的弹出: ?function uploadImgFile(id){window.open(${base}

JS 在open打开的窗口中调用父页面JS方法

父窗口的弹出:

?

    function uploadImgFile(id){        window.open("${base}/ajax/picupload.action?parentImgUrlId="+id,"","height=300, width=500, toolbar =no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");        //document.getElementById(id).value = someValue;    }function testfun(aaa){alert("111+"+aaa);}
?

?

?

?

在open 的窗口中调用

?

    function setParentImgUrl(){    window.opener.testfun('aaaaa');        //window.opener.document.getElementById("${parentImgUrlId}").value = document.getElementById('img_url').value;        window.close();    }
?

热点排行