TA的文章(1)
-
js 判断数据类型的方法
js 判断数据类型的方法判断js中的数据类型有一下几种方法:typeof、instanceof、 constructor、 prototype、 $.type()/jquery.type()。举个例子:var a = "iamstring."; var b = 222; var c= [1,2,3]; var d = new Date(); var e = function(){alert(111);}; var f = function(){this.name="22";}; 1、最常见的判断