0

怎样重载window.alert,并且同步执行,

lillian created at6 years ago view count: 257
window.alert = function(){
};
alert(233);//没有执行完就会执行后面的语句
console.log(1); //
report
回复
0

需要加个callback function

    window.alert = function(message, callback) {

            if (callback instanceof Function) {
                callback();
            }

    };
6 years ago 回复

相关搜索关键词

Recent search keywords