模拟window.onerror方法
var Order = {
onerror : null,
showError: function(){
if(this.onerror){
this.onerror("E0008","Order对象未空");
}
}
}
Order.onerror = function(errorCode,errorMsg){
alert("Code:"+errorCode+",Msg:"+errorMsg);
}
Order.showError();