2014年12月22日

Object.prototype.toString.call() 区分对象类型

摘要: 在 JavaScript 里使用 typeof 来判断数据类型,只能区分基本类型,即 “number”,”string”,”undefined”,”boolean”,”object” 五种。对于数组、函数、对象来说,其关系错综复杂,使用 typeof 都会统一返回 “object” 字符串。要想区... 阅读全文

posted @ 2014-12-22 16:04 itjeff 阅读(272) 评论(0) 推荐(0) 编辑

导航