明天经理就要了,催得很紧啊怎么办,我下载的这个怎么不好使啊?
<script language="javascript">
var timerID = null;var timerRunning = false
var stardate = new Date();var startime = gettotalsecond(stardate)
var totaltime = 60; var lasttime;var facetime
function Stepclock(){
// hk made by himself
if(timerRunning)
clearTimeout(timerID)
timerRunning = false }
function startclock(){
Stepclock();showtime() }
function gettotalsecond(getdate){
var hours = getdate.getHours()
var minutes = getdate.getMinutes();var seconds = getdate.getSeconds()
var gettotalsecond = seconds + minutes * 60 + hours * 3600
return(gettotalsecond) }
function showtime(){
var now = new Date();var timeValue = gettotalsecond(now)
document.clock.face.value = timeValue - startime
facetime = document.clock.face.value;lasttime = totaltime - facetime
document.clock.sytime.value = lasttime
timerID = setTimeout("showtime()",1000)
timerRunning = true
if (lasttime == 20){
for(i=1;i<=3;i++){
alert('考试时间只剩下最后20秒!')}}
if (lasttime == 0){
for(i=1;i<=5;i++){
alert('时间完毕!请迅速交卷!!')}}
if (lasttime == -10){
for(i=1;i<=10;i++){
alert('考试时间超过10秒,关闭此窗口!')}}
}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>计时器</title>
</head><body onLoad="Stepclock()">
</body>
</html>
<script language="javascript">
var timerID = null;var timerRunning = false
var stardate = new Date();var startime = gettotalsecond(stardate)
var totaltime = 60; var lasttime;var facetime
function Stepclock(){
// hk made by himself
if(timerRunning)
clearTimeout(timerID)
timerRunning = false }
function startclock(){
Stepclock();showtime() }
function gettotalsecond(getdate){
var hours = getdate.getHours()
var minutes = getdate.getMinutes();var seconds = getdate.getSeconds()
var gettotalsecond = seconds + minutes * 60 + hours * 3600
return(gettotalsecond) }
function showtime(){
var now = new Date();var timeValue = gettotalsecond(now)
document.clock.face.value = timeValue - startime
facetime = document.clock.face.value;lasttime = totaltime - facetime
document.clock.sytime.value = lasttime
timerID = setTimeout("showtime()",1000)
timerRunning = true
if (lasttime == 20){
for(i=1;i<=3;i++){
alert('考试时间只剩下最后20秒!')}}
if (lasttime == 0){
for(i=1;i<=5;i++){
alert('时间完毕!请迅速交卷!!')}}
if (lasttime == -10){
for(i=1;i<=10;i++){
alert('考试时间超过10秒,关闭此窗口!')}}
}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>计时器</title>
</head><body onLoad="Stepclock()">
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货