Sample code

The date after date can be changed to the online date of the website


function getRuntime() {
     window.setTimeout("show_runtime()", 1000);
     X = new Date("9/6/2019 10:00:00");
     Y = new Date();
     T = (Y.getTime()-X.getTime());
     M = 24 * 60 * 60 * 1000;
     a = T / M;
     A = Math.floor(a);
     b = (a-A) * 24;
     B = Math.floor(b);
     c = (b-B) * 60;
     C = Math.floor((b-B) * 60);
     D = Math.floor((c-C) * 60);
     return "Currently running: "+ A + "day" + B + "hour" + C + "minute" + D + "second"
}

getRuntime();
Likes(0) Reward

Comment list count 0 Comments

No Comments

WeChat Self-Service

WeChat Consult

TaoBao

support@elephdev.com

发表
评论
Go
Top