<!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=gb2312" />
<title></title>
<!--
= * = = * = = * = = * = = * = = * = = * = = * = = * = = * = = * = = *
* 作 者: 我本有心
= QQ: 381584252
* E - Mail: hztgcl1986@ 163 .com
= 转载请注明出处及作者!
* 版权所有,侵权必究!!!
=
* http: // www.8848so.com,人物搜索,8848So
= * = = * = = * = = * = = * = = * = = * = = * = = * = = * = = * = = *
-->
< script language = " javascript " type = " text/javascript " >
var h,m,s,hstr,mstr,sstr,timestr;
var etime = 80 * 60 ; // 总秒数
function timer()
{
h = Math.floor(etime / 3600 ); // 时
m = Math.floor(etime / 60 ) % 60 ; // 分
s = Math.floor(etime % 60 ); // 秒
h < 0 ? h = 0 : h = h;
m < 0 ? m = 0 : m = m;
s < 0 ? s = 0 : s = s;
h.toString().length < 2 ? hstr = " 0 " + h.toString() : hstr = h; // 1显示01
m.toString().length < 2 ? mstr = " 0 " + m.toString() : mstr = m; // 1显示01
s.toString().length < 2 ? sstr = " 0 " + s.toString() : sstr = s; // 1显示01
timestr = hstr + " : " + mstr + " : " + sstr;
txt.value = timestr;
etime = etime - 1 ;
}
</ script >
= * = = * = = * = = * = = * = = * = = * = = * = = * = = * = = * = = *
* 作 者: 我本有心
= QQ: 381584252
* E - Mail: hztgcl1986@ 163 .com
= 转载请注明出处及作者!
* 版权所有,侵权必究!!!
=
* http: // www.8848so.com,人物搜索,8848So
= * = = * = = * = = * = = * = = * = = * = = * = = * = = * = = * = = *
-->
< script language = " javascript " type = " text/javascript " >
var h,m,s,hstr,mstr,sstr,timestr;
var etime = 80 * 60 ; // 总秒数
function timer()
{
h = Math.floor(etime / 3600 ); // 时
m = Math.floor(etime / 60 ) % 60 ; // 分
s = Math.floor(etime % 60 ); // 秒
h < 0 ? h = 0 : h = h;
m < 0 ? m = 0 : m = m;
s < 0 ? s = 0 : s = s;
h.toString().length < 2 ? hstr = " 0 " + h.toString() : hstr = h; // 1显示01
m.toString().length < 2 ? mstr = " 0 " + m.toString() : mstr = m; // 1显示01
s.toString().length < 2 ? sstr = " 0 " + s.toString() : sstr = s; // 1显示01
timestr = hstr + " : " + mstr + " : " + sstr;
txt.value = timestr;
etime = etime - 1 ;
}
</ script >
</head>
<body οnlοad="window.setInterval('timer()',1000);">
<input type="button" id="txt" name="txt" value="" />
</body>
</html>