Ajax
xieting153
每天进步一点点,越来越好
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
AJAX中的get和post请求方式的区别
/* * get 系列 * get * head 只获取响应头 * delete 删除后台对应的某个属性 * post系列 * post * put 给后台添加对应数据 * get post 的区别 * 1、传参的方式 * get 是把参数拼接到 url后边 * post 是把请求参数放到请求体当中 * 2、传参的大小限制 * get 谷歌...原创 2018-09-09 14:06:13 · 236 阅读 · 0 评论 -
jq中的AJAX
$.ajax({ type:'get', url:'./1.json', data:{name:'小红'}, dataType:'json', success:function (data) { console.log(data); }, error:function (res) { console.log(r...原创 2018-09-09 14:11:15 · 286 阅读 · 0 评论 -
ajax请求参数
eg: var xhr = new XMLHttpRequest(); xhr.open(‘get’,’./1.xml’,true); xhr.onreadystatechange = function () { console.dir(xhr.readyState); // 1 –》2 ; 2 –》3 ; 3–》4 都是http改变的状态码 setTimeou...原创 2018-09-09 14:22:31 · 242 阅读 · 0 评论 -
ajax promise
<script> function ajaxPromise(options){ let { type='get', url, data = {}, dataType = 'json', cache = false // 不缓存 ...原创 2018-09-11 01:55:00 · 144 阅读 · 0 评论
分享