iframe ajax call example

WBOY
Release: 2016-07-25 09:12:38
Original
1123 people have browsed it

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



Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!