日韩av免费一二三区-2021精品久久久久精品k8-亚洲红杏AV无码专区首页-99精品久久久久久水蜜桃

咨詢電話:
15628812133
07
2018/07

怎樣實現(xiàn)ajax與php數(shù)據(jù)的交互并局部刷新頁面?

發(fā)布時間:2018-07-07 10:07:55
發(fā)布者:liyongxing
瀏覽量:
0

ajax基本語法

$.ajax({
    type: "post",  //數(shù)據(jù)的提交方式(post\get)
    url: "text.php",  //提交的url地址
    data: {name:name,pwd:pwd},//需要提交的數(shù)據(jù)
    dataType: "json",//返回的數(shù)據(jù)類型格式
    success: function(msg){      //返回成功的回調(diào)函數(shù)
    },
    error:function(msg){      //返回失敗的回調(diào)函數(shù)
    }
});

php端的接收方法

html端代碼text.html


  
  ajaxTest
    
    
    
    

php端代碼text.php

在text.html中加入以下js代碼

關(guān)鍵詞:
返回列表