
ajax
augfun
旧博客遗失,新博客凑活着用吧
展开
-
ajax data的参数
$.ajax({ type: "POST", url: "some.php", data: "name=John&location=Boston", //第一种方式传参 // data: {name:"John",location:"Boston"} //第二种方式传参 // data: {foo:["bar1", "bar2"]} 转换为 '&foo=bar1&foo转载 2017-04-10 01:15:50 · 1000 阅读 · 0 评论 -
$.ajax()方法详解
jquery中的ajax方法参数总是记不住,这里记录一下。 1.url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址。 2.type: 要求为String类型的参数,请求方式(post或get)默认为get。注意其他http请求方法,例如put和delete也可以使用,但仅部分浏览器支持。 3.timeout: 要求为Number类型的参数,设置请求超时时间(毫秒...转载 2018-09-11 05:57:11 · 166 阅读 · 0 评论