数据类型检测

 

// 类型检测
typeof str           //检测string boolean number undefind
toString.call(obj)   //检测 null function object array...等对象
a instanceof Object  //a是否是由 Object构造
posted @ 2017-09-04 15:54  DaivdAndLemon  阅读(94)  评论(0编辑  收藏  举报