Heim  >  Artikel  >  Backend-Entwicklung  >  iframe式ajax调用示例

iframe式ajax调用示例

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

1.新建 a.html

  1. iframe式ajax调用
复制代码

2.新建 b.php

  1. echo "
  2. <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

效果如图
iframe式ajax调用示例



Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn