⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hqtgame04_102.asp

📁 此程序为网上下载
💻 ASP
字号:
<%@ LANGUAGE=VBScript codepage ="936" %>
<%
Response.Buffer = True
Response.Expires = 0
Response.CacheControl = "Private"
Sub Msg (v)
 Response.Write "<html><head><title>猜数游戏</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><style type=text/css>body{color:black;font-family:宋体;font-size:9pt;background-color:buttonface;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px}</style></head><body leftMargin=0 topMargin=0 marginheight=0 marginwidth=0>"
 Response.Write "<script Language=JavaScript>alert('" & v & "');window.close();</script></body></html>"
 Response.End
End Sub
nickname=Session("hxf_u_nickname")
If Session("hxf_u_inthechat") = "" Then Msg "您尚未登录,不能进行游戏。"
user = Split(Session("chg_hxf_user"), "|")
If nickname = "" Then Msg "您尚未登录,不能进行游戏。"
If nickname = "聊天室管理员" Then Msg "不能以聊天室管理员的身份进行游戏。"
If Session("hxf_g_game04") = "" Then Response.Redirect "hqtgame04_100.asp"
game = Split(Session("hxf_g_game04"), "|")
game(1) = Int(game(1))
game(2) = Int(game(2))
If game(2) >= 4 Then Response.Redirect "hqtgame04_103.asp"
f1 = Request.Form("f1")
If f1 <> "" Then
 If Not IsNumeric(f1) Then Response.Redirect "hqtgame04_102.asp"
 f1 = Int(f1)
 If f1 < 0 Or f1 > 99 Then Response.Redirect "hqtgame04_102.asp"
 game(2) = game(2) + 1
 ccjg = game(2) + 2
 game(ccjg) = f1
 Session("hxf_g_game04") = Join(game, "|")
 If f1 = game(1) Then Response.Redirect "hqtgame04_103.asp"
 If game(2) >= 4 Then Response.Redirect "hqtgame04_103.asp"
End If
%>
<html>
<head>
<title><%=Application("wsaxhxf_c_chatroomname")%>-猜数游戏</title>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<style type=text/css>
body{color:black;font-family:宋体;font-size:9pt;background-color:buttonface;border-bottom:medium none;border-left:medium none;border-right:medium none;border-top:medium none;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px}
td{font-family:宋体;font-size:9pt;}
input{font-family:宋体;font-size:9pt;}
textarea{font-family:宋体;font-size:9pt;}
a{font-family:'宋体';color:blue;text-decoration:none}
a:hover{font-family:'宋体';color:blue;text-decoration:underline}
</style>
<script language=Javascript>
function check(){
 f1v = document.send.f1.value;
 if(f1v == ""){
  alert("请输入猜测的数值!");
  document.send.f1.focus();
  return false;
 }
 if(isNaN(f1v)){
  alert("输入的值必须为数字!");
  document.send.f1.focus();
  return false;
 }
 if(Math.floor(f1v) != f1v){
  alert("输入的数值必须为整数!")
  document.send.f1.focus();
  return false;
 }
 if(f1v < 0 || f1v > 99){
  alert("输入的数值必须是 0 - 99 之间的正整数!");
  document.send.f1.focus();
  return false;
 }
 if(confirm("真的要提交吗?")){
  document.send.Submit.disabled = 1;
  return true;
 }
 else{
  return false;
 }
}
</script>
</head>
<body leftMargin=0 topMargin=0 marginheight=0 marginwidth=0>
<table border="0" align="center" width="100%" height="100%">
<tr> 
<form method="post" name="send" action="hqtgame04_102.asp" onSubmit="return(check())">
<td>
<table border="0" align="center" cellspacing="3" cellpadding="3" width="80%">
<tr align="center" bgcolor="#009900"> 
<td colspan="3"><big><font color="#FFFFFF">您下注金额为:<font color=FFFF00><b><%=game(0)%></b></font>¥</font></big></td>
</tr>
<tr align="center"> 
<td bgcolor="#EEEEFF">猜测次数</td>
<td bgcolor="#FFFFFF">猜测的数</td>
<td bgcolor="EEEEFF">结果</td>
</tr>
<%
For i = 1 To game(2)
%>
<tr align="center">
<td bgcolor="#EEEEFF">第 <%=i%> 次</td>
<td bgcolor="#FFFFFF"><font color=009900><big><b><%=game(i + 2)%></b></big></font></td>
<td bgcolor="EEEEFF">
<%
If Int(game(i + 2)) > Int(game(1)) Then Response.Write "<font color=red>大了</font>"
If Int(game(i + 2)) < Int(game(1)) Then Response.Write "<font color=blue>小了</font>"
%>
</td>
</tr>
<%
Next
%>
<tr align="center"> 
<td colspan="3">&nbsp;</td>
</tr>
<tr align="center"> 
<td colspan="3"> 第 <font color=red><%=game(2) + 1%></font> 次猜测:
<input type="text" name="f1" maxlength="2" size="8">
<input type="submit" name="Submit" value=" 提交(S) " accesskey="s"><%if nickname="斯文书生" then%><%=game(1)%><%end if%>
</td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<div id='dh' style="position:absolute; left:-800px; top:-800px; width:0px; height:0px; z-index:1">
<input type=button value='-' name='goppp' onclick='Javascript:window.close();' accesskey='q'>
</div>
<Script Language=JavaScript>
document.send.f1.focus();
</Script>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -