menu
47 文章
0 评论
408728 浏览
0 当前访客
ღゝ◡╹)ノ❤️

Js全局错误弹出

window.onerror = handleError
function handleError(msg, url, l) {
    var txt = "There was an error on this page.\n\n";
    txt += "Error: " + msg + "\n";
    txt += "URL: " + url + "\n";
    txt += "Line: " + l + "\n\n";
    txt += "Click OK to continue.\n\n";
    alert(msg);
    return true;
}

标题:Js全局错误弹出
作者:admin
地址:http://www.mjdg.store/articles/2022/09/23/1663911144900.html

评论
取消