主頁 > 知識(shí)庫 > iframe式ajax調(diào)用示例

iframe式ajax調(diào)用示例

熱門標(biāo)簽:科大訊飛語音識(shí)別系統(tǒng) Linux服務(wù)器 Mysql連接數(shù)設(shè)置 阿里云 團(tuán)購網(wǎng)站 電子圍欄 銀行業(yè)務(wù) 服務(wù)器配置
1.新建 a.html
復(fù)制代碼 代碼如下:

!doctype html>
html>
head>
meta charset='utf-8'>
title>iframe式ajax調(diào)用/title>
/head>
body>
form action='b.php' method='post' name='' id='' target='formTarget'>
input type='text' name='username' id='' placeholder='' value='' />
input type='submit' name='' value='提交' />
span id='msg'>/span>
/form>
iframe src='' name='formTarget' id='formTarget' style='display:none'>/iframe>
/body>
/html>

2.新建 b.php
復(fù)制代碼 代碼如下:

?php
echo "
script>
parent.document.getElementById('msg').innerHTML = 'iframe式ajax調(diào)用成功!';
alert('您輸入的是:{$_POST['username']}');
window.setTimeout(function(){
parent.window.location.reload();
},3000);
/script>
";

3.訪問: http://localhost/a.html

效果如圖
 
您可能感興趣的文章:
  • ajax調(diào)用中ie緩存問題解決方法
  • ajax+php控制所有后臺(tái)函數(shù)調(diào)用
  • jQuery Ajax調(diào)用WCF服務(wù)詳細(xì)教程
  • jQuery調(diào)用ajax請(qǐng)求的常見方法匯總
  • 使用ajax技術(shù)無刷新動(dòng)態(tài)調(diào)用新浪股票實(shí)時(shí)數(shù)據(jù)
  • jQuery ajax調(diào)用WCF服務(wù)實(shí)例
  • ajax的定時(shí)調(diào)用每5秒調(diào)用一次
  • iframe式ajax調(diào)用示例代碼
  • jquery中的ajax方法怎樣通過JSONP進(jìn)行遠(yuǎn)程調(diào)用
  • JavaScript調(diào)用ajax獲取文本文件內(nèi)容實(shí)現(xiàn)代碼
  • jquery.Ajax()方法調(diào)用Asp.Net后臺(tái)的方法解析
  • ajax調(diào)用簡(jiǎn)單實(shí)例

標(biāo)簽:廣元 萍鄉(xiāng) 蚌埠 江蘇 大理 衡水 衢州 棗莊

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《iframe式ajax調(diào)用示例》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266