ฟังก์ชั่นต้นแบบมีฟังก์ชั่นที่ง่ายมาก ค้นหา ID ของนาฬิกาคำนวณค่าและดำเนินการงานเมื่อเวลาซื้อถึง
ฟังก์ชั่น 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 ();