日期:2014-05-16 浏览次数:20414 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> </head> <body> <span id="demo"></span> <script type="text/javascript"> function f() { var d = new Date(); h = d.getHours(); var obj = document.getElementById('demo'); if (h > 0 && h <= 3) obj.innerHTML = '0'; if (h > 3 && h <= 6) obj.innerHTML = '1'; if (h > 6 && h <= 9) obj.innerHTML = '3'; if (h > 9 && h <= 12) obj.innerHTML = '19288'; if (h > 12 && h <= 13) obj.innerHTML = '19322'; if (h > 15 && h <= 18) obj.innerHTML = '18'; if (h > 18 && h <= 21) obj.innerHTML = '27'; if (h > 21 && h <= 23) obj.innerHTML = '32'; } f(); setInterval('f()', 10 * 60 * 1000); </script> </body> </html>