摘要: 1.for()语句性能优于for(...in...)语句2.避免重复创建函数,避免使用闭包。推荐使用prototype追加方法3.判断一个js对象是否支持某个属性或方法时使用if(typeof(person.attr)!='undefined') ,考虑到当person.attr=null,0,fa... 阅读全文
posted @ 2014-08-06 14:20 xss392795158 阅读(469) 评论(0) 推荐(0) 编辑