admin 管理员组

文章数量: 1086019


2024年3月11日发(作者:本地smtp服务器)

Jquery 计时器

JScript code

(function($){

var countdown = function(item, config)

{

var seconds = parseInt($(item).attr(ute));

var timer = null;

var doWork = function()

{

if(seconds >= 0)

{

if(typeof(ck) == "function")

{

var data = {

total : seconds ,

second : (seconds % 60) ,

minute : ((seconds / 60) % 60) ,

hour : ((seconds / 3600) % 24) ,

day : (seconds / 86400)

};

(item, seconds, data, item);

}

seconds --;

}else{

nterval(timer);

}

}

timer = erval(doWork, 1000);

doWork();

};

var main = function()

{

var args = arguments;

var config = { attribute : 'data-seconds', callback : null };

if( == 1)

{

if(typeof(args[0]) == "function") ck =

args[0];

if(typeof(args[0]) == "object") $.extend(config, args[0]);

}else{

ute = args[0];

ck = args[1];

}

$(this).each(function(index, item){

(item, item, config);

});

};

$.own = main;

})(jQuery);

HTML code

  • 总共-
  • -
  • -
  • -
  • -

  • 总共-
  • -
  • -
  • -
  • -

  • 总共-
  • -
  • -


本文标签: 服务器 作者