ajax与php交互

红太狼 2022-11-28 10:28 260阅读 0赞

ajax基本语法
$.ajax({
type: “post”, //数据提交方式(post/get)
url: “demo.php”, //提交到的url
data: {username:username,password:password},//提交的数据
dataType: “json”,//返回的数据类型格式
success: function(msg){
…//返回成功的回调函数
},
error:function(msg){
…//返回失败的回调函数
}
});
php端的接收方法

发表评论

表情:
评论列表 (有 0 条评论,260人围观)

还没有评论,来说两句吧...

相关阅读