object.prototype.toString()判断类型
Object.prototype.toString()方法返回一个代表该对象的字符串
var o = new Object();
o.toString(); //[object object]
toString.call(new Date); // [object Date] toString.call(new String); // [object String] toString.call(Math); // [object Math] // Since JavaScript ES5 toString.call(undefined); // [object Undefined] toString.call(null); // [object Null]