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