css中常见几种float方式以及倒计时(刷新页面不清)

时间:2022-01-31 16:23:21

css中常见几种float方式

http://jingyan.baidu.com/article/72ee561a670269e16138dfd5.html

<script type="text/javascript">
var maxtime; if(window.name==''){
maxtime=1*60;
}
else{
maxtime=window.name;
}
function CountDown(){
if(maxtime>=0){
minutes=Math.floor(maxtime/60);
seconds=Math.floor(maxtime%60);
msg="距离倒计时结束还有:"+minutes+"分"+seconds+"秒";
document.all["timer"].innerHTML=msg;
if(maxtime==zsj*60){
alert('考试正式开始');
}
--maxtime;
window.name=maxtime;
}
else{
clearInterval(timer);
$(".btn").css("display","none");
alert("考试已经结束了");
}
}
timer=setInterval("CountDown()",1000);
</script>