06 2009 档案
摘要:看下面代码:var test = function f(){ alert(typeof f);}test();alert(typeof f);在IE6和IE7中执行是输出2次"function";而在Firefox中第1次是输出"function",第2次是输出"undefined"。也就是说在Firefox中函数名的作用域只在该函数内。我没测过IE8,不知道IE8是不是还是和IE6/7一样。
阅读全文
摘要:function assert(bCondition, sErrorMsg) { if (!bCondition) { alert(sErrorMsg); throw new Error(sErrorMsg); } }
阅读全文
浙公网安备 33010602011771号