Home  >  Article  >  Backend Development  >  iframe ajax call example

iframe ajax call example

WBOY
WBOYOriginal
2016-07-25 09:12:381076browse

1. Create a.html

  1. iframe-style ajax call
  2. < /head>
Copy code

2. Create new b.php

  1. echo "
  2. <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
iframe ajax call example



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn