var total=0; var data=new Array(5);//定义了data数组,length为5,但是都是元素都是undefined. for(i=0;i<data.length;i++){ if(!data[i]) { total=total+1; continue;} total +=data[i]; } alert(total); !data[i]为true,data[i]===undefined也是true.typeof(data[i])=='undefined'也是tru…
错误信息 TypeError: Unable to get property ‘replace’ of undefined or null referenceTypeError: Unable to get property ‘replace’ of undefined or null reference TypeError: Unable to get property ‘replace’ of undefined or null referenceTypeError: Unable to g…