Javascript的assert()

function assert(bCondition, sErrorMsg) {
       if (!bCondition) {
             alert(sErrorMsg);
             throw new Error(sErrorMsg);
       }
}
posted @ 2009-06-12 23:56  Skyman  阅读(2757)  评论(1)    收藏  举报