摘要:        
typeof 可以匹配对象的类型,但是他的能力很弱,比如 typeof new String('123')会显示的object这是我们不想看到的结果很久以前JQ的作者通过Object.prototype.toString.call(name)这逆天的方法帮我们指明的道路. function fixTyoeof(obj){ var retVal; //由于typeof null 也会是object我们这里去排除 if(obj === null) return 'null'; //Math我们也去排除 ...    阅读全文
        posted @ 2014-03-29 22:29
somesayss
阅读(418)
评论(0)
推荐(0)
                    
                
浙公网安备 33010602011771号