<style type="text/css">
<!--
#sub{border:1px #00f solid;width:280px;height:100px;position:absolute;display:none;background:#fff}
#tit{width:280px;height:22px;background:#00f;font-size:14px;font-weight:700;color:#fff;line-height:24px;;padding-left:1px;}
#tit_time{margin-left:100px;font-size:12px;}
#inf{width:280px;height:80px;padding:30px;}
#inf span{width:100px; text-align:center;CURSOR: pointer}.STYLE25 { color: #000000;
font-size: 24px;
font-weight: bold;
}
.STYLE15 {font-size: 20px}
.STYLE30 {
color: #000000;
font-size: 18px;
}
.STYLE32 {color: #00CCFF}
.STYLE33 {color: #000000}
.STYLE34 {color: #0098FF}
.STYLE16 {font-size: 16px}
-->
</style>
<script type="text/JavaScript">
<!--
var t=0,timer;function $(id){
return document.getElementById(id)
}function RunTimer(k){//倒计时
changeColor(2)
$("tit_time").innerHTML="倒计时: "+k+" 秒"
k = k-2
if (k>=0){
timer=setTimeout(function(){RunTimer(k)},2000)
} else{
subFoem()
}
}
function changeColor(s){//"【提交】变色
var obj=$("sub_form")
obj.style.color=obj.style.color=="#f00"?"":"#f00"
s--
if (s>0)setTimeout(function(){changeColor(s)},200)
}function showSub(){//显示对话框
var posX=document.body.offsetWidth ||document.documentElement.offsetWidth
var posY=document.body.offsetHeight ||document.documentElement.offsetHeight with($("sub").style){
top=posY/2-100+"px"
left=posX/2-160+"px"
display="block"
}
t=10
RunTimer(t)
}function hidSub(){//隐藏对话框
if ($("sub").style.display="block"){
clearTimeout(timer)
$("sub").style.display="none"
$("sub_bt").disabled=0
}
}
function subFoem(){//提交
hidSub()
document.forms[0].option.value="-3";
form.submit();
}
//-->
function stA() {
document.forms[0].option.value="1";
return true;
}function stB() {
document.forms[0].option.value="2";
return true;
}
function stC() {
document.forms[0].option.value="3";
return true;
}
function stD() {
document.forms[0].option.value="4";
return true;
}
function stYES() {
document.forms[0].option.value="8";
return true;
}
function stNO() {
document.forms[0].option.value="16";
return true;
}
function stPre() {
document.forms[0].option.value="-1";
return true;
}
function stNext() {
document.forms[0].option.value="-2";
return true;
}function run(){ var s = document.getElementById("otime");
s.value = s.value * 1 - 1;
alert(2);
if(s.value==0)
{
document.getElementById("otime").value=5;
document.forms[0].option.value="-3";
return true;
}
window.setTimeout(run(), 1000);
}function stRefer() { showSub();
}
function timeOver() { alert("考试时间到!"); document.forms[0].option.value="-3";
form.submit();
}
function showLeftTime(stopTimeMillSec) {
var now = new Date();
var nowMillSec = now.getTime();
var today = new Date(stopTimeMillSec - nowMillSec);
if(today < 0 ){
timeOver();
}
var hour = today.getHours() - 8;
var minute = today.getMinutes();
var second = today.getSeconds();
time = hour + ":" + minute + ":" + second;
document.form.lefttime.value = time;
var s = "showLeftTime(" + stopTimeMillSec + ");"
window.setTimeout(s, 500);
}
<!--
#sub{border:1px #00f solid;width:280px;height:100px;position:absolute;display:none;background:#fff}
#tit{width:280px;height:22px;background:#00f;font-size:14px;font-weight:700;color:#fff;line-height:24px;;padding-left:1px;}
#tit_time{margin-left:100px;font-size:12px;}
#inf{width:280px;height:80px;padding:30px;}
#inf span{width:100px; text-align:center;CURSOR: pointer}.STYLE25 { color: #000000;
font-size: 24px;
font-weight: bold;
}
.STYLE15 {font-size: 20px}
.STYLE30 {
color: #000000;
font-size: 18px;
}
.STYLE32 {color: #00CCFF}
.STYLE33 {color: #000000}
.STYLE34 {color: #0098FF}
.STYLE16 {font-size: 16px}
-->
</style>
<script type="text/JavaScript">
<!--
var t=0,timer;function $(id){
return document.getElementById(id)
}function RunTimer(k){//倒计时
changeColor(2)
$("tit_time").innerHTML="倒计时: "+k+" 秒"
k = k-2
if (k>=0){
timer=setTimeout(function(){RunTimer(k)},2000)
} else{
subFoem()
}
}
function changeColor(s){//"【提交】变色
var obj=$("sub_form")
obj.style.color=obj.style.color=="#f00"?"":"#f00"
s--
if (s>0)setTimeout(function(){changeColor(s)},200)
}function showSub(){//显示对话框
var posX=document.body.offsetWidth ||document.documentElement.offsetWidth
var posY=document.body.offsetHeight ||document.documentElement.offsetHeight with($("sub").style){
top=posY/2-100+"px"
left=posX/2-160+"px"
display="block"
}
t=10
RunTimer(t)
}function hidSub(){//隐藏对话框
if ($("sub").style.display="block"){
clearTimeout(timer)
$("sub").style.display="none"
$("sub_bt").disabled=0
}
}
function subFoem(){//提交
hidSub()
document.forms[0].option.value="-3";
form.submit();
}
//-->
function stA() {
document.forms[0].option.value="1";
return true;
}function stB() {
document.forms[0].option.value="2";
return true;
}
function stC() {
document.forms[0].option.value="3";
return true;
}
function stD() {
document.forms[0].option.value="4";
return true;
}
function stYES() {
document.forms[0].option.value="8";
return true;
}
function stNO() {
document.forms[0].option.value="16";
return true;
}
function stPre() {
document.forms[0].option.value="-1";
return true;
}
function stNext() {
document.forms[0].option.value="-2";
return true;
}function run(){ var s = document.getElementById("otime");
s.value = s.value * 1 - 1;
alert(2);
if(s.value==0)
{
document.getElementById("otime").value=5;
document.forms[0].option.value="-3";
return true;
}
window.setTimeout(run(), 1000);
}function stRefer() { showSub();
}
function timeOver() { alert("考试时间到!"); document.forms[0].option.value="-3";
form.submit();
}
function showLeftTime(stopTimeMillSec) {
var now = new Date();
var nowMillSec = now.getTime();
var today = new Date(stopTimeMillSec - nowMillSec);
if(today < 0 ){
timeOver();
}
var hour = today.getHours() - 8;
var minute = today.getMinutes();
var second = today.getSeconds();
time = hour + ":" + minute + ":" + second;
document.form.lefttime.value = time;
var s = "showLeftTime(" + stopTimeMillSec + ");"
window.setTimeout(s, 500);
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货