如何解决IE SCRIPT1002匹配函数返回错误
我遇到了问题,我的代码在IE以外的所有浏览器中都能正常工作。 IE向我返回了SCRIPT1002语法错误。 这行: if(data.responseText.match(/Произошла。* /)){ 在下一个代码上:
localRequest: function(period,adapter,adapterType,errText){
let _this = this;
let iRow = rowInfo.iRow;
let aboutRow = rowInfo.aboutRow;
queryState = $.ajax({
type: 'get',url: 'api/ds/cs',dataType: 'json',data: {
period: period,adapter: adapter,adapterType: adapterType,errText: errText,subject: iRow.value,body: aboutRow.value
},}).done(function (data) {
}).fail(function(data){
**if(data.responseText.match(/Произошла.*/)) {**
let errText = data.responseText.split(')',)
let errNumb = errText[0].split('(',)
alert('Не удалось сформировать проишествие: ' + errText[1] + ' №' + errNumb[1])
} else {
alert(data.responseText);
}
})
},
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。