Python微信订餐小程序课程视频
https://edu.csdn.net/course/detail/36074
Python实战量化交易理财系统
https://edu.csdn.net/course/detail/35475
一、JQuery发送Ajax请求
■ 对于get和post请求,jQuery内部封装了Ajax请求的4个步骤和数据格式的设置
■ 对于Ajax通用请求,jQuery内部封装了Ajax请求的4个步骤和数据格式设置、超时设置、请求失败设置
(1)jquery-server的get请求:
- 客户端html处理:
//$.get(url, [data], [callback], [type])
$('button').eq(0).click(function () {
//$get方法的回调参数接收一个data作为参数---是服务端响应回来的数据(响应体),然后设置响应的数据格式为json
$.get('http://127.0.0.1:8000/jquery-server', {a:1, b:2}, function (data) {
console.log(data);
}