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