
function sendAjax(url, param, datat, callback) {
$.ajax({
type: "post",
url: url,
data: param,
dataType: datat,
success: callback,
error: function() {
ClosetoastLoading();
errorTip();
}
});
}
function ajax(url, data) {
return $.ajax({
url: apiUrl + url,
data: data,
type: 'get',
success: function(res) {
if (res && res.code == 200) {
return res
} else {
message(res.msg)
return
}
},
error: function(e) {
message(JSON.parse(e.responseText).message)
}
});
}
上面是“jQuery ajax封装用方法”的全面内容,想了解更多关于 js 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_123.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

Decopy AI:一款免费的在线AI检测写作工具,支持本改写、摘要生成
织梦cms如何在搜索页显示相关关键词
MatChat AI:一款由松山湖材料实验室主导开发的材料科学领域的AI智能体