摘要:
jQuery已经成为项目中最常见的js库,也是前端开发最喜欢使用的库。下面是在项目中封装了jQuery的Ajax,分享给大家。
代码:
if(opt.error) {
opt.error(data);
}
},
error: function(xhr, status, handler) {
if (opt.error)
opt.error();
}
};
};
function unescapeEntity(str) {
var reg = /&(?:nbsp|#160|lt|#60|gt|62|amp|#38|quot|#34|cent|#162|pound|#163|yen|#165|euro|#8364|sect|#167|copy|#169|reg|#174|trade|#8482|times|#215|divide|#247);/g,
entity = {
\' \' : \' \',
\' \' : \' \',
\'<\' : \'<\',
\'<\' : \'<\',
\'>\' : \'>\',
\'&62;\' : \'>\',
\'&\' : \'&\',
\'&\' : \'&\',
\'\"\' : \'\"\',
\'\"\' : \'\"\',
\'¢\' : \'¢\',
\'¢\' : \'¢\',
\'£\' : \'£\',
\'£\' : \'£\',
\'¥\' : \'¥\',
\'¥\' : \'¥\',
\'€\' : \'
本文地址:https://www.stayed.cn/item/5605
转载请注明出处。
本站部分内容来源于网络,如侵犯到您的权益,请 联系我