判定类型
摘要:
目前最精确的判定方法(不包括自定义类型)//2010.6.1更新 var is = function (obj,type) { return (type === "Null" && obj === null) || (type === "Undefined" && obj === void 0 ) || (type === "Number" && isFinite(obj)) || Object.prototype.toString.call(obj).slice(8,-1) === t 阅读全文
posted @ 2010-01-20 18:56 司徒正美 阅读(3430) 评论(2) 推荐(2) 编辑