js 定时器 AJAX
<%@LANGUAGE="VBSCRIPT"CODEPAGE="65001"%><!--#includefile="conn.asp"--><%dimid,sql,rsi...
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="conn.asp"-->
<%
dim id,sql,rs
id=trim(request.QueryString("id"))
'response.write id
tii=trim(request.QueryString("tii"))
tii=tii
width=50
width=tii*width
cgfen=trim(request.QueryString("cgfen"))
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from question_stage where iscurrent=true"
rs1.open sql1,conn,1,1
if not rs1.eof then
stage_id=rs1("stage_id")
end if
sql="select * from game_ques where bianhao="&id&" and ques_stage="&stage_id
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
%>
<form name="form1">
<div style="font-size:14px; line-height:100%;">
<%=RS("QUES")%><BR /><br />
<input name="rad" type="<%if len(rs("answer"))=1 then response.write "radio" else response.write "checkbox" end if%>" value="a" /><%=RS("A")%><BR /><br />
<input name="rad" type="<%if len(rs("answer"))=1 then response.write "radio" else response.write "checkbox" end if%>" value="b" /><%=RS("B")%><BR /><br />
<% if(rs("c")<>"") then%><input name="rad" type="<%if len(rs("answer"))=1 then response.write "radio" else response.write "checkbox" end if%>" value="c" /><%=RS("C")%><BR /><br /><% end if%>
<% if(rs("d")<>"") then%><input name="rad" type="<%if len(rs("answer"))=1 then response.write "radio" else response.write "checkbox" end if%>" value="d" /><%=RS("D")%><BR /><br /><% end if%>
<input name="answer" type="hidden" disabled="disabled" value="" />
<input name="c_answer" type="hidden" disabled="disabled" value="<% =rs("answer")%>" />
<input name="" type="button" value="提交答案" onClick="chk();"/>
</div>
</form>
<br /><br />
<table width="400" cellspacing="0" cellpadding="0">
<tr>
<td height="20" align="left" valign="middle"><%response.write "您的得分为"&cgfen&"分"%></td>
</tr>
</table>
<table width="400" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>
<td height="5"><table width="400" height="5" cellpadding="0" cellspacing="0">
<tr>
<td height="5" align="center">1</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">6</td>
<td align="center">7</td>
<td align="center">8</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="10"><table border="0" width="<%=width%>" cellspacing="0" cellpadding="0" height="5" bgcolor="#FF0000">
<tr>
<td height="10"></td>
</tr>
</table></td>
</tr>
</table>
<%
end if
%>
上面的是闯关答题 回传到主页面的代码,我要求隔某段时间若未点击提交就直接提交CHK()
高手帮忙啊!!!!!
1楼的哥们,加上是好使,但如果我点击提交调用CHK()后,他到30000这个时间的时候还会执行CHK()???? 展开
<!--#include file="conn.asp"-->
<%
dim id,sql,rs
id=trim(request.QueryString("id"))
'response.write id
tii=trim(request.QueryString("tii"))
tii=tii
width=50
width=tii*width
cgfen=trim(request.QueryString("cgfen"))
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from question_stage where iscurrent=true"
rs1.open sql1,conn,1,1
if not rs1.eof then
stage_id=rs1("stage_id")
end if
sql="select * from game_ques where bianhao="&id&" and ques_stage="&stage_id
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
%>
<form name="form1">
<div style="font-size:14px; line-height:100%;">
<%=RS("QUES")%><BR /><br />
<input name="rad" type="<%if len(rs("answer"))=1 then response.write "radio" else response.write "checkbox" end if%>" value="a" /><%=RS("A")%><BR /><br />
<input name="rad" type="<%if len(rs("answer"))=1 then response.write "radio" else response.write "checkbox" end if%>" value="b" /><%=RS("B")%><BR /><br />
<% if(rs("c")<>"") then%><input name="rad" type="<%if len(rs("answer"))=1 then response.write "radio" else response.write "checkbox" end if%>" value="c" /><%=RS("C")%><BR /><br /><% end if%>
<% if(rs("d")<>"") then%><input name="rad" type="<%if len(rs("answer"))=1 then response.write "radio" else response.write "checkbox" end if%>" value="d" /><%=RS("D")%><BR /><br /><% end if%>
<input name="answer" type="hidden" disabled="disabled" value="" />
<input name="c_answer" type="hidden" disabled="disabled" value="<% =rs("answer")%>" />
<input name="" type="button" value="提交答案" onClick="chk();"/>
</div>
</form>
<br /><br />
<table width="400" cellspacing="0" cellpadding="0">
<tr>
<td height="20" align="left" valign="middle"><%response.write "您的得分为"&cgfen&"分"%></td>
</tr>
</table>
<table width="400" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>
<td height="5"><table width="400" height="5" cellpadding="0" cellspacing="0">
<tr>
<td height="5" align="center">1</td>
<td align="center">2</td>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">5</td>
<td align="center">6</td>
<td align="center">7</td>
<td align="center">8</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="10"><table border="0" width="<%=width%>" cellspacing="0" cellpadding="0" height="5" bgcolor="#FF0000">
<tr>
<td height="10"></td>
</tr>
</table></td>
</tr>
</table>
<%
end if
%>
上面的是闯关答题 回传到主页面的代码,我要求隔某段时间若未点击提交就直接提交CHK()
高手帮忙啊!!!!!
1楼的哥们,加上是好使,但如果我点击提交调用CHK()后,他到30000这个时间的时候还会执行CHK()???? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询