06 2009 档案

摘要: 阅读全文
posted @ 2009-06-21 00:31 Skyman
摘要:看下面代码: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一样。 阅读全文
posted @ 2009-06-13 19:16 Skyman 阅读(278) 评论(0) 推荐(0)
摘要:function assert(bCondition, sErrorMsg) {   if (!bCondition) {      alert(sErrorMsg);      throw new Error(sErrorMsg);   } } 阅读全文
posted @ 2009-06-12 23:56 Skyman 阅读(2763) 评论(1) 推荐(0)