首页 > 解决方案 > script16389:未指定的错误。填充物(1,10884)

问题描述

我有一个 JSP 页面最初正确呈现,当我单击链接时,页面将刷新,Windows 10 Edge 42 中出现以下错误。我不确定错误,我没有使用任何 polyfill。当我单击错误时,它没有显示要调试的确切错误行。请在下面找到 JS 代码和帮助。

script16389:未指定的错误。填充物(1,10884)

main.js

$(document).click(function (e) {
    var el = e.target;
    var className = el.className;
    if (className.indexOf("dropdown-section") < 0 && className.indexOf("dropdown-content") < 0 && className !== "dropdown-selected" && !(el.tagName === "INPUT" && $(el).parent().hasClass("dropdown-container"))) {
        $(".dropdown-section").removeClass("open");
    }
});

function buildShortAnswer(rq) {
    return "<input type=\"text\" class=\"input_box\" id=\"question" + rq.questionId + "\" tabindex=\"" + (rq.questionSettings.index + 3) + "\" name=\"question" + rq.questionId + "\" onkeyup=\"handleShortAnswerChange(event, " + rq.questionId + ")\" maxlength=\"" + rq.questionProperties[SHORT_ANSWER].maxLength + "\" />";
}

function replaceTag(tag) {
    var tagsToReplace = {
        '&': '&amp;',
        '<': '&lt;',
        '>': '&gt;'
//      '"': '&quot;'
    };
    return tagsToReplace[tag] || tag;
}

function safeTagsReplace(str) {
    return str.replace(/[&<>]/g, replaceTag);
}

function isValidUserName(username) {
    var regex = /^(?!.*[&<>]).*$/;
    if (regex.test(username)) {
        return true;
    }
    return false;  
}

function isValidemail(email) {
    var regex = /^([^\s@<>]{1,200})@([^\s@<>]{1,300})$/;
    if (regex.test(email.trim())) {  
        return true;
    }
    return false;
}

function getParameterByName(name, url) {
    if (!url){
        url = window.location.href;
    }
    name = name.replace(/[\[\]]/g, "\\$&");
    var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
        results = regex.exec(url);
    if (!results){
        return null;
    }
    if (!results[2]){
        return '';
    }
    return decodeURIComponent(results[2].replace(/\+/g, " "));
}

标签: javascriptmicrosoft-edge

解决方案


我遇到了同样的问题,这是一个与 AutoFormFill 合并的边缘扩展冲突的问题。您可以禁用功能选择设置,向下滚动并单击“查看高级设置”,然后在“自动填充”部分禁用“保存表单条目”开关。除了错误之外,它不应该影响您的程序的执行。


推荐阅读