问题描述
我有一个简单的表格,它位于 IFRAME 中.当用户单击提交时,它会重定向到我服务器上的特定页面.我用于重定向的功能是
I have a simple form which is inside IFRAME. When user click on SUBMIT, it redirects to a specific page on my server. The function I use for the redirect is
header ('Location: mypage2.html');
exit ();
但我希望新页面在 _top 位置打开,而不是在我使用的同一个 IFRAME 内.如何告诉浏览器在 _top 中而不是在 IFRAME 中打开新页面?提前致谢.
But I want the new page to open in _top location, not inside the same IFRAME that I use. How can I tell the browser to open the new page in _top not inside the IFRAME? Thanks in advance.
推荐答案
在 PHP 中无法达到预期的效果.这是您必须从 JavaScript 执行的操作,或者将 target 属性添加到 <form>:
You are not able to achieve the desired effect in PHP. This is something you'd have to do from JavaScript or add target attribute to <form>:
<form ... target="_top">
这篇关于PHP“标头(位置)"在 IFRAME 中,加载到 _top 位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)