2017 年 11 月

javascript判断数据类型

javascript判断数据类型

由于typeof 只能判断基本类型 string,number,boolean, undefined,object 利用 Object.prototype.toString.call 实现: function type (obj) { return Object.prototype.to

东明兄 东明兄 2017-11-23
1.4K+ 0 0