1. Create a.html
2. Create new b.php
- echo "
- <script> </li>
<li>parent.document.getElementById('msg').innerHTML = 'iframe ajax call successful!'; </li>
<li>alert('You entered: {$ _POST['username']}'); </li>
<li>window.setTimeout(function(){ </li>
<li>parent.window.location.reload(); </li>
<li>},3000); </li>
<li></script>
Copy code
3. Visit: http://localhost/a.html
The effect is as shown in the picture
|