һ
 ¼ע

QQ¼

ֻһٿʼ

̳ WEBҳǰ뿪 ǰ̨ű

һ򵥵ĵʱJS

[]
6990 С 2022-8-9 08:43:12
| ʾȫ¥
1F

ϵ½עᣬύѣø๦ܣϴزIJޣ

Ҫ ¼ ſػ鿴û˺ţ¼ע

x
  1. //ʱ
  2.     var bsDate = new Date('9/3/2021');

  3.     function getchaTime() {
  4.         var date = new Date();
  5.         var start = bsDate.getTime() - date.getTime();
  6.         var startday = Math.floor(start / (1000 * 60 * 60 * 24));
  7.         if (startday > 0) {
  8.             $('#shi').text(Math.floor(startday / 10));
  9.             $('#ge').text(startday % 10);
  10.         } else {
  11.             $('#shi').text(0);
  12.             $('#ge').text(0);
  13.         }
  14.     }

  15.     getchaTime();
  16.     window.setInterval('getchaTime()', 3600000);
ƴ

HTML룺
  1. <div><span id="shi"></span><span id="ge"></span></div>
ƴ



Դ΢http://weibo.com/techued Դ΢Źںţweb-tech
ʹõ ٱ ظ
б

ֹ

̳¡ͼƬѷϴվԭתԻ,µİȨԭ
վַİȨ֪ͨǵĹԱ,Ա(Email:admin@websjy.com)ʱȡȨɾ
ܾκκʽڱ̳л񹲺͹ִ!

QQ| 42011102000510|Archiver|ֻ|Դ-̳ ( ICP19023897-2 )

GMT+8, 2023-6-6 08:23

ٻظ ض б