1.新建 a.html
2.新建 b.php
- echo "
- <script> </li>
<li>parent.document.getElementById('msg').innerHTML = 'iframe式ajax调用成功!'; </li>
<li>alert('您输入的是:{$_POST['username']}'); </li>
<li>window.setTimeout(function(){ </li>
<li>parent.window.location.reload(); </li>
<li>},3000); </li>
<li></script>
复制代码
3.访问: http://localhost/a.html
效果如图
|