function assert(bCondition, sErrorMsg) {
if (!bCondition) {
alert(sErrorMsg);
throw new Error(sErrorMsg);
}
}
转载于:https://www.cnblogs.com/skyman/archive/2009/06/12/1502407.html