亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

加上判斷時分秒有無變化、添加彩色小球的代碼之后,倒計時就不動了?

加上判斷時分秒有無變化、添加彩色小球的代碼之后,倒計時就不動了?

為什么我寫單獨一個小球跳動就可以顯示,寫多個小球之后,加上判斷時分秒有無變化、添加彩色小球的代碼之后,倒計時就不動了?我用NetBeans寫的。function update(){? ??? ? var nextShowTimeSeconds=getCurrentShowTimeSeconds(); ?//下一個變化的時間? ??? ? var nextHours = parseInt( nextShowTimeSeconds / 3600);? ? var nextMinutes = parseInt( (nextShowTimeSeconds - nextHours * 3600)/60 );? ? var nextSeconds = nextShowTimeSeconds % 60;? ??? ? var curHours = parseInt( curShowTimeSeconds / 3600); //當前時間? ? var curMinutes = parseInt( (curShowTimeSeconds - curHours * 3600)/60 );? ? var curSeconds = curShowTimeSeconds % 60;? ??? ? if(nextSeconds!==curSeconds){? ? ? ??? ? ? ? //加入以下if之后時間靜止不刷新? ? ? ? if(parseInt(curHours/10)!==parseInt(nextHours/10)){ ? //對小時的變化判斷? ? ? ? ? ? addBalls(MARGIN_LEFT+0,MARGIN_TOP,parseInt(curHours/10));? ? ? ? }? ? ? ? if(parseInt(curHours%10)!==parseInt(nextHours%10)){? ? ? ? ? ? addBalls(MARGIN_LEFT+15*(R+1),MARGIN_TOP,parseInt(curHours%10));? ? ? ? }? ? ? ??? ? ? ? if(parseInt(curMinutes/10)!==parseInt(nextMinutes/10)){//對分鐘的變化判斷? ? ? ? ? ? addBalls(MARGIN_LEFT+39*(R+1),MARGIN_TOP,parseInt(curMinutes/10));? ? ? ? }? ? ? ? if(parseInt(curMinutes%10)!==parseInt(nextMinutes%10)){? ? ? ? ? ? addBalls(MARGIN_LEFT+54*(R+1),MARGIN_TOP,parseInt(curMinutes%10));? ? ? ? }? ? ? ??? ? ? ?if( parseInt(curSeconds/10) !== parseInt(nextSeconds/10) ){? ? ? ? ? ? addBalls( MARGIN_LEFT + 78*(R+1) , MARGIN_TOP , parseInt(curSeconds/10) );? ? ? ? }? ? ? ? if( parseInt(curSeconds%10) !== parseInt(nextSeconds%10) ){? ? ? ? ? ? addBalls( MARGIN_LEFT + 93*(R+1) , MARGIN_TOP , parseInt(nextSeconds%10) );? ? ? ? }? ? ? ? if( parseInt(curSeconds%10) !== parseInt(nextSeconds%10) ){? ? ? ? ? ? addBalls( MARGIN_LEFT + 93*(R+1) , MARGIN_TOP , parseInt(nextSeconds%10) );? ? ? ? ? ??? ? ? ? }? ? ? ? ??? ? ? ? curShowTimeSeconds=nextShowTimeSeconds;??? ? }? ? ?updateBalls();}
查看完整描述

目前暫無任何回答

  • 0 回答
  • 0 關注
  • 1370 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號