首頁>Club>
5
回覆列表
  • 1 # 小剛紀實

    可以參考Jquery的 sleep()函式。(function($){var _sleeptimer;$.sleep = function( time2sleep, callback ){$.sleep._sleeptimer = time2sleep;$.sleep._cback = callback;$.sleep.timer = setInterval("$.sleep.count()", 1000);}$.extend ($.sleep, {current_i : 1,_sleeptimer : 0,_cback : null,timer : null,count : function(){if ( $.sleep.current_i === $.sleep._sleeptimer ){clearInterval($.sleep.timer);$.sleep._cback.call(this);}$.sleep.current_i++;}});})(jQuery);

  • 中秋節和大豐收的關聯?
  • 誤差線的正負值是什麼?