各路大神解答
<script type="text/javascript">
? ?window.onload=function(){
? ? ? ?var li=Document.getElementsByTagName("ali");
? ? ? ?ali.onmousemover()=function(){
? ? ? ? ? ?startMove(10,400);
? ? ? ?}
? ? ? ?ali.onmouseout=function(){
? ? ? ? ? ?startMove(-10,200);
? ? ? ?}
? ?}
? ?var timer=null;
? ?function stratMove(speed,iTarget){
? ? ? ?clearInterval(timer);
? ? ? ?var ali=document.getElementsByTagName("ali");
? ? ? ?timer=setInterval(function(){
? ? ? ? ? ?if(ali.offsetwidth==iTarget){
? ? ? ? ? ? ? ?clearInterval(timer);
? ? ? ? ? ?}
? ? ? ? ? ?else{
? ? ? ? ? ? ?ali.style.width=ali.offsetwidth+speed+'px';
? ? ? ? ? ?}
? ? ? ?},30)
? ?}
</script>
2016-09-19
2016-08-28
第三行定義的變量名為li,不應該是ali麼,,,
第四行ali.onmouseover后面為什么要加括號?把括號去掉,,,