let type = function(t) { var p = ({}).toString.call(t); var typeObj = { "[object Object]": "Object", "[object Array]": "Array", "[object Number]": "Number", "[object String]": "String", "[object Function]": "Function", "[object Boolean]": "Boolean", "[object Null]": ‘Null‘, "[object Undefined]": "Undefined" } return typeObj[p] ? typeObj[p] : false; };
时间: 2024-10-08 23:45:29