jquery异常 Uncaught TypeError: $(…).on is not a function

jquery异常问题Uncaught TypeError: $(...).on is not a function

报错

jquery异常问题Uncaught TypeError: $(...).on is not a function

jquery异常问题Uncaught TypeError: $(...).on is not a function

解决办法

第一种 :引入更高的js

第二种:使用bind

jquery异常问题Uncaught TypeError: $(...).on is not a function

jquery 捕获ajax的异常

代码:

$.ajax({        type: 'POST',        url: '/welcome/wechat/send',        data: d,        success: function(data) {            console.log(data);        },        error: function(err) {            console.log(err);        }    });

说明:如果发送请求的时候,断网了,那么就会直接进入err回调函数。

以上为个人经验,希望能给大家一个参考,也希望大家多多支持。

原文地址:https://blog.csdn.net/weixin_44550490/article/details/102603186

相关文章: