特黄性暴力强在线播放,免费成人在线电影,成人精品福利视频,国产视频www,88888888国产一区二区,久热九九,刘亦菲人久久精品二区三区

首頁(yè) 服務(wù) 產(chǎn)品 文檔 關(guān)于

jQuery.handleError is not a function錯誤

handlerError只在jQuery-1.4.2之前的版本中存在,jQuery-1.4.2之后的版本中都沒(méi)有這個(gè)函數了

所以jquery.form提交時(shí)有時(shí)候會(huì )提示該錯誤。


在jquery引用之后的某個(gè)js中加入:

jQuery.extend({
? ? handleError: function (s, xhr, status, e) {
? ? ? ? if (s.error) {
? ? ? ? ? ? s.error.call(s.context || s, xhr, status, e);
? ? ? ? }
? ? ? ? if (s.global) {
? ? ? ? ? ? (s.context ? jQuery(s.context) : jQuery.event).trigger("ajaxError", [xhr, s, e]);
? ? ? ? }
? ? },
? ? httpData: function (xhr, type, s) {
? ? ? ? var ct = xhr.getResponseHeader("content-type"),
? ? ? ? ? ? xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
? ? ? ? ? ? data = xml ? xhr.responseXML : xhr.responseText;
? ? ? ? if (xml && data.documentElement.tagName == "parsererror")
? ? ? ? ? ? throw "parsererror";
? ? ? ? if (s && s.dataFilter)
? ? ? ? ? ? data = s.dataFilter(data, type);
? ? ? ? if (typeof data === "string") {
? ? ? ? ? ? if (type == "script")
? ? ? ? ? ? ? ? jQuery.globalEval(data);
? ? ? ? ? ? if (type == "json")
? ? ? ? ? ? ? ? data = window["eval"]("(" + data + ")");
? ? ? ? }
? ? ? ? return data;
? ? }
});

新巴尔虎左旗| 庆安县| 都昌县| 南雄市| 颍上县| 黄冈市| 曲阜市| 东城区| 融水| 遂溪县| 大安市| 富宁县| 读书| 鄂伦春自治旗| 三门峡市| 孟州市| 鲁山县| 越西县| 连平县| 武邑县| 桑植县| 衡水市| 南丰县| 永济市| 湖州市| 墨玉县| 呼和浩特市| 霍山县| 大安市| 航空| 临泉县| 长阳| 新巴尔虎左旗| 南康市| 固原市| 江阴市| 临沂市| 高要市| 平顶山市| 德江县| 类乌齐县|