格式
$.ajax({url, 请求的url地址type, 请求的方式data,dataType, 请求的数据类型success:res=>{ 成功的回调console.log(res)}})
http://192.168.4.18:3000/search?keywords=你jquery-ajax中 get传值问号后面的值,可以放在data属性中
例子
var url = "http://192.168.4.18:3000/search?keywords=你"$.ajax({url,type:"get",data:{keywords:"你"},success:res=>{console.log(res)}})$.get(url).then(res=>{console.log(res)})$.get(url,res=>{console.log(res)})
