摘要: > typeof null // 要小心!'object'解决办法: 下面的函数可以修复这个问题(只针对这个用例).function getPrimitiveTypeName(x) { var typeName = typeof x; switch(typeName) { case "undefined": case "boolean": case "number": case "string": return typeName; case "object": if ... 阅读全文
posted @ 2012-09-21 16:43 倩影 阅读(135) 评论(0) 推荐(0)