如何判断js中的数据类型:typeof、instanceof、 constructor、 prototype方法比较。
如何判断js中的类型呢,先举几个例子:vara="iamstring.";varb=222;varc=[1,2,3];vard=newDate();vare=function(){alert(111);};varf=function(){this.name="22";};最常见的判断方法:typeofalert(typeofa)------------>stringalert(typeofb)--