首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

记时 考试 提交数据

2013-04-09 
倒计时 考试 提交数据function CurrTime(){document.getElementById(currTime).innerHTML 15:00set

倒计时 考试 提交数据

      function CurrTime()         {            document.getElementById("currTime").innerHTML = "15:00";            setTimeout(uceOneSec, 1000);        }
        function uceOneSec() {            var currTime = document.getElementById("currTime");            var tempTime = currTime.innerHTML.split(":");            var minute = tempTime[0];            var second = tempTime[1];            if (second >= 1) {                second = (second - 1 > 9) ? (second - 1) : "0" + (second - 1);            }            else {                second = 59;                if (minute >= 1) {                    minute = (minute - 1 > 9) ? (minute - 1) : "0" + (minute - 1);                }                else {                }            }            document.getElementById("currTime").innerHTML = minute + ":" + second;            if (minute == 0 && second == 0) {   //执行提交事件               
} else {                setTimeout(uceOneSec, 1000);            }        }
 
 
<body onload='CurrTime()'>
 <div  style="display: block">            考试时间<span style="color: #FF3300; font-size: medium"><asp:Label ID="lblExamTime" runat="server"                Text="15分钟"></asp:Label></span> <span id="time" >剩余时间:</span> <span id="currTime" style="color: #FF3300;">15            </span>        </div></body>


热点排行