Hope can fix on IE, not tested

This commit is contained in:
Seven Du
2013-07-31 00:23:07 +08:00
parent 5454a95f5b
commit 2eb010758e
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
// var ie_console_alertFallback = true;
// var ie_console_divFallback = true;
if (typeof console === "undefined" || typeof console.log === "undefined") {
console = {};
if (typeof ie_console_divFallback != "undefined") {
console.log = function(msg) {
$('#ie_console_debug_div').append(msg);
$('#ie_console_debug_div').append("<br>");
}
} else if (typeof ie_console_alertFallback != "undefined" ) {
console.log = function(msg) {
alert(msg);
};
} else {
console.log = function() {};
}
}