码迷,mamicode.com
首页 > Web开发 > 详细

ajax三种发送方式demo

时间:2019-07-09 19:26:53      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:pat   check   username   post方法   text   cti   fun   contex   path   

.ajax方法:
$.ajax({ url:"${pageContext.request.contextPath}/user/checkUserName", data:{"username":username}, type:"post", dataType:"json", success:function (data) { alert(data); } });

.post方法

$.post(
"${pageContext.request.contextPath}/user/isUniqueUsername", //url
{"username":username}, //data
function(data){}, //success
'text'  //dataType
); 

ajax三种发送方式demo

标签:pat   check   username   post方法   text   cti   fun   contex   path   

原文地址:https://www.cnblogs.com/zhz-8919/p/11159339.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!