Rev 6099 | Rev 17412 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6099 | Rev 9305 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | !set wims_html_onload=examclock(); |
- | |
2 | !set wims_html_header=!append line <script type="text/javascript"> to $wims_html_header |
- | |
- | 1 | ||
3 | !if $wims_exam_remain |
2 | !if $wims_exam_remain!=$empty |
4 |
|
3 | !set wims_html_onload=examclock(); |
5 |
|
4 | !set wims_html_header=!append line <script type="text/javascript">\ |
6 | !else |
- | |
7 |
|
5 | var examtick=$wims_exam_remain;\ |
8 | function examclock() {\ |
6 | function examclock() {\ |
9 | var timeStr;\ |
7 | var timeStr;\ |
10 | examtick=(examtick>1)? examtick-1:0;\ |
8 | examtick=(examtick>1)? examtick-1:0;\ |
11 | minutes=Math.floor(examtick/60); seconds=examtick%60;\ |
9 | minutes=Math.floor(examtick/60); seconds=examtick%60;\ |
12 | timeStr= ((minutes < 10) ? "0" : "") + minutes;\ |
10 | timeStr= ((minutes < 10) ? "0" : "") + minutes;\ |
13 | timeStr+= ((seconds < 10) ? ":0" : ":") + seconds;\ |
11 | timeStr+= ((seconds < 10) ? ":0" : ":") + seconds;\ |
14 |
|
12 | var message = "$wims_name_examremain" + " " + timeStr + ".";\ |
- | 13 | window.status=message;\ |
|
- | 14 | document.getElementById('exam_clock').innerHTML = message;\ |
|
15 | Timer= setTimeout("examclock()",1000);\ |
15 | Timer= setTimeout("examclock()",1000);\ |
- | 16 | }\ |
|
16 |
|
17 | </script> to $wims_html_header |
17 | !endif |
18 | !endif |
18 | !set wims_html_header=!append line </script> to $wims_html_header |
- |