简体   繁体   English

使用window.opener从弹出窗口将值传递到父页面

[英]passing value to parent page from pop up using window.opener

I am trying to send a php value to the parent page from a pop up but all that happens is the pop up goes blank. 我正在尝试从弹出窗口向父页面发送php值,但所有发生的事情是弹出窗口为空。 I am sure it is my syntax that is wrong. 我确信这是我的语法错误。

die( '<script>window.opener.location.search=?week_start='.$week_start.'; window.close();</script>');

I would be grateful is someone could help me correct it. 我将不胜感激,有人可以帮助我纠正它。

Thanks 谢谢

这是您更正的语法:

die( '<script>window.opener.location.search=\'?week_start='.$week_start.'\'; window.close();</script>');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM