js实现考试时间倒计时
来源:互联网 发布:微商城源码 哪个好 编辑:程序博客网 时间:2024/06/08 04:41
<html>
<head>
</head>
<body>
<input type="text" name="mss" id="mss"/>
<form action="./index.html">
<input type="text" value="name" name="name"/>
</form>
<body>
</html>
<script type="text/javascript">
<!--
window.onload=function(){
daojishi();
}
var counttime=90*60;//总秒钟
function daojishi(){
if(counttime>=0){
var ms = counttime%60;//余数 89%60==29秒
var mis = Math.floor(counttime/60);//分钟
if(mis>=60){
var hour=Math.floor(mis/60);
mis=Math.floor((counttime-hour*60*60)/60);
document.getElementById("mss").value=hour+"小时"+mis+"分"+ms+"秒数";
}else if(mis>=1){
document.getElementById("mss").value=mis+"分"+ms+"秒数";
}else{
document.getElementById("mss").value=ms+"秒数";
}
counttime--;
vartt = window.setTimeout("daojishi()",1000);
}else{
window.clearTimeout(vartt);
window.confirm("考试时间结束,请单击提交");
tijiao();
}
}
function tijiao(){
document.forms[0].submit();
}
//-->
</script>
- js实现考试时间倒计时
- js实现考试倒计时
- js实现考试倒计时
- js实现考试倒计时系统
- JS 实现时间倒计时
- js实现时间倒计时
- js实现注册时间倒计时
- js 简单时间倒计时实现
- JS 考试倒计时
- 考试系统倒计时实现
- js倒计时计算,可以计算考试时间和网站促销活动倒计时
- js 实现时间倒计时和setInterval用法
- js 实现两时间相减倒计时
- js实现有关时间的倒计时
- 时间倒计时 JS
- js时间倒计时
- JS 时间倒计时
- js时间倒计时
- MINI6410 AD驱动 搞定
- 测试文章
- 测试文章
- 测试文章
- mysql数据备份
- js实现考试时间倒计时
- 30分钟掌握STL
- SQL Server 2005 中 Cross join & Cross Apply & Outer Apply 的区别
- java生成24小时制的datatime
- 我的vimrc文件配置
- Mac OS X上好用的SVN客户端推荐
- C++程序员必读的经典著作
- 19 March IELTS
- oracle 查询表空间SQL