给Input标签添加监听事件 值被改变即触发指定任务
//id=customeridcard 标签添加监听改变事件
(function ($) {
const o = $.fn.val;
$.fn.val = function () {
const r = o.apply(this, arguments);
if (this.is("#customeridcard") && arguments.length > 0) {
this.trigger("change");
}
return r;
}
})(jQuery);
$("#customeridcard").change(function () {
Method(); //执行方法
})

浙公网安备 33010602011771号