1.判断类型的方法
1.typeof alert(typeof a);
2.instanceof alert(a instanceof Array);
3.constructor a.constructor === Array
4.prototype Object.prototype.toString.call(a) === '[object String]'
5.jQuery.type() jQuery.type(undefined) === 'undefined'
1.判断类型的方法
1.typeof alert(typeof a);
2.instanceof alert(a instanceof Array);
3.constructor a.constructor === Array
4.prototype Object.prototype.toString.call(a) === '[object String]'
5.jQuery.type() jQuery.type(undefined) === 'undefined'