ajax 和 axios对比
1.语法差异
// 1.ajax
$.ajax({
type: 'POST',
url: url,
data: data,
dataType: dataType,
success: function () {},
error: function () {}
});
// 2.axios
axios({
method: 'post',
url: '/user/12345',
data: {
firstName: 'Fred',
原创
2020-06-23 15:30:41 ·
325 阅读 ·
0 评论