[英]How to use window.opener for using the functions from .js included in the parent page
For exemple, in the parent page 例如,在父页面中
<script src="js/test.js"></script>
and then we use window.open to open page 2, so in page 2, how do we use window.opener for calling functions in the test.js? 然后我们使用window.open打开第2页,因此在第2页中,我们如何使用window.opener来调用test.js中的函数?
window.opener.functionOnParentPage();
尝试这个:
window.opener.functionName()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.