1.错误案例:if(!arr==null){
alert("生日为"+arr[0]);
alert("生日为"+arr[0]);
}
1.正确案例:if(arr!=null){
alert("生日为"+arr[0]);
}
2.当定义一个function 运行之后报 it is not a function 表示与javaScript库函数同名,解决办法,更换函数名。
3.setInterval()的用法有点特殊:
intt=self.setInterval("next()",2000);
<input value="停止播放" οnclick="intt=window.clearInterval(intt)" type="button" id="myInput"/>
如此才能停止,直接在function 中使用无效,为什么还不知道
JQuery篇
1.
animate({params},speed,callback)中params的css属性为backgroundColor而不是
background-color,且
backgroundColor:‘red’可能不生效,应该
backgroundColor:#ffff...
每天记录错误与之解决方法,日后才知道之前的强大