欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

一個判斷搶購時間是否到達的簡單的js函數(shù)

 更新時間:2014年06月23日 09:51:34   投稿:whsnow  
這篇文章主要介紹了一個簡單的判斷搶購時間是否到達的js函數(shù),原理很簡單,找到時鐘的id,計算數(shù)值,到達搶購時間時執(zhí)行任務(wù),需要的朋友可以參考下

原型函數(shù),功能很簡單,找到時鐘的id,計算數(shù)值,到達搶購時間時執(zhí)行任務(wù)。

function nwt() {var str=$('#deal_expiry_timer_e3cdcd2a').text(); 
var out=str.match(/\d+/g);console.log(out); 
var h=parseInt(out[0]),m=parseInt(out[1]),s=parseInt(out[2]); 
console.log(h+'#'+m+'#'+s);var calc=h*3600+m*60+s;console.log(calc); 
if(calc==0){} else {console.log('wait');} 
var t=setTimeout('nwt()',2000);} 
nwt();

相關(guān)文章

最新評論