Heim  >  Artikel  >  Backend-Entwicklung  >  怎么通过iframe打开和关闭指定页面

怎么通过iframe打开和关闭指定页面

WBOY
WBOYOriginal
2016-06-13 12:27:28905Durchsuche

如何通过iframe打开和关闭指定页面
各位哥,我有两个页面,一个是1.PHP,还有一个是登录注册页面,login.php。1.php内容为:
  


  
    
  
  
登录

    
   
  

我想实现:1、在1.PHP点击登录后,就在屏幕中间弹出login.php;不点登录,则不弹出。
                     2、在login.php登录或注册登录后,自动关闭这个框架,仍回到弹出login.PHP之前的1.php,并刷新1.php。

我研究几天了,仍不得要领,请帮忙!谢谢!
------解决思路----------------------
login.PHP 操作完成后输出
<script>parent.location.reload()<.script><br />就可使 1.php 刷新<br />而 login.PHP 会随着 1.php 的刷新消失<br><font color='#FF8000'>------解决思路----------------------<br>parent.location.herf?这句话没用吧(而且是href不是herf...)<br />这个地方是要让页面刷新吗。把两个地方换成parent.location.reload()试试<br />注意是reload,要加上两个括号<br /><br />不行的话建议你去看完jquery的ajax再来实现这个功能,表单太不灵活<div class="clear"> </script>
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn