用vbs实现的连连看在线游戏

      2019-12-11 14:00      编程语言
大家可以参考下代码,发现这个真个不错的思路

在线演示
<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.0Transitional//EN">
<HTML>
<HEAD>
<TITLE>连连看__本站</TITLE>
<METAhttp-equiv=Content-Typecontent="text/html;charset=gb2312">
<METAcontent=VBScriptname=VI60_defaultClientScript>
<METAcontent=charset=gb2312>
<STYLEtype=text/css>.mytb{
FONT-WEIGHT:bolder;VERTICAL-ALIGN:middle;CURSOR:hand;COLOR:#FF6600;FONT-FAMILY:"Wingdings";TEXT-ALIGN:center
}
</STYLE>
<METAcontent="MSHTML6.00.2800.1106"name=GENERATOR>
</HEAD>
<BODY>
<TABLEcellSpacing=0cellPadding=0width=800align=centerborder=0>
<TBODY>
<TR>
<TD>连连看游戏:将两个相同格子连接起来就会消失,看谁连的快,限时10分钟!</TD></TR></TBODY></TABLE><BR>
<TABLEborderColor=#000066height=20cellSpacing=0cellPadding=0width=600
align=centerborder=1>
<TBODY>
<TR>
<TDid=myproc1borderColor=#0099ccwidth=0bgColor=#000066></TD>
<TDid=myproc2borderColor=#0099ccwidth=600></TD></TR></TBODY></TABLE>
<TABLEcellSpacing=0cellPadding=0width=400align=centerborder=0>
<TBODY>
<TR>
<TDalign=middlewidth="30%">用时:</TD>
<TDid=Showmytimealign=middlewidth="30%"></TD>
<TDalign=middlewidth="30%">秒</TD></TR></TBODY></TABLE>
<TABLEclass=mytbborderColor=#0066CCcellSpacing=0cellPadding=0align=center
border=1>
<TBODY>
<TR>
<TDid=td_0_0width=40height=40></TD>
<TDid=td_0_1width=40height=40></TD>
<TDid=td_0_2width=40height=40></TD>
<TDid=td_0_3width=40height=40></TD>
<TDid=td_0_4width=40height=40></TD>
<TDid=td_0_5width=40height=40></TD>
<TDid=td_0_6width=40height=40></TD>
<TDid=td_0_7width=40height=40></TD>
<TDid=td_0_8width=40height=40></TD>
<TDid=td_0_9width=40height=40></TD>
<TDid=td_0_10width=40height=40></TD>
<TDid=td_0_11width=40height=40></TD>
<TDid=td_0_12width=40height=40></TD>
<TDid=td_0_13width=40height=40></TD>
<TDid=td_0_14width=40height=40></TD>
<TDid=td_0_15width=40height=40></TD>
<TDid=td_0_16width=40height=40></TD>
<TDid=td_0_17width=40height=40></TD></TR>
<TR>
<TDid=td_1_0width=40height=40></TD>
<TDid=td_1_1onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_2onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_3onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_4onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_5onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_6onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_7onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_8onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_9onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_10onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_11onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_12onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_13onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_14onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_15onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_16onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_1_17width=40height=40></TD></TR>
<TR>
<TDid=td_2_0width=40height=40></TD>
<TDid=td_2_1onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_2onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_3onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_4onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_5onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_6onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_7onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_8onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_9onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_10onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_11onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_12onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_13onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_14onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_15onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_16onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_2_17width=40height=40></TD></TR>
<TR>
<TDid=td_3_0width=40height=40></TD>
<TDid=td_3_1onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_2onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_3onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_4onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_5onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_6onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_7onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_8onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_9onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_10onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_11onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_12onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_13onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_14onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_15onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_16onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_3_17width=40height=40></TD></TR>
<TR>
<TDid=td_4_0width=40height=40></TD>
<TDid=td_4_1onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_2onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_3onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_4onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_5onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_6onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_7onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_8onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_9onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_10onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_11onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_12onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_13onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_14onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_15onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_16onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_4_17width=40height=40></TD></TR>
<TR>
<TDid=td_5_0width=40height=40></TD>
<TDid=td_5_1onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_2onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_3onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_4onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_5onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_6onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_7onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_8onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_9onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_10onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_11onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_12onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_13onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_14onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_15onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_16onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_5_17onclick=vbs:aaa(me)width=40height=40></TD></TR>
<TR>
<TDid=td_6_0width=40height=40></TD>
<TDid=td_6_1onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_2onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_3onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_4onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_5onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_6onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_7onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_8onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_9onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_10onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_11onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_12onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_13onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_14onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_15onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_16onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_6_17width=40height=40></TD></TR>
<TR>
<TDid=td_7_0width=40height=40></TD>
<TDid=td_7_1onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_2onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_3onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_4onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_5onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_6onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_7onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_8onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_9onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_10onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_11onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_12onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_13onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_14onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_15onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_16onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_7_17width=40height=40></TD></TR>
<TR>
<TDid=td_8_0width=40height=40></TD>
<TDid=td_8_1onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_2onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_3onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_4onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_5onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_6onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_7onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_8onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_9onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_10onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_11onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_12onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_13onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_14onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_15onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_16onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_8_17width=40height=40></TD></TR>
<TR>
<TDid=td_9_0width=40height=40></TD>
<TDid=td_9_1onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_2onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_3onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_4onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_5onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_6onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_7onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_8onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_9onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_10onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_11onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_12onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_13onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_14onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_15onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_16onclick=vbs:aaa(me)borderColor=#0066CCwidth=40
height=40></TD>
<TDid=td_9_17width=40height=40></TD></TR>
<TR>
<TDid=td_10_0width=40height=40></TD>
<TDid=td_10_1width=40height=40></TD>
<TDid=td_10_2width=40height=40></TD>
<TDid=td_10_3width=40height=40></TD>
<TDid=td_10_4width=40height=40></TD>
<TDid=td_10_5width=40height=40></TD>
<TDid=td_10_6width=40height=40></TD>
<TDid=td_10_7width=40height=40></TD>
<TDid=td_10_8width=40height=40></TD>
<TDid=td_10_9width=40height=40></TD>
<TDid=td_10_10width=40height=40></TD>
<TDid=td_10_11width=40height=40></TD>
<TDid=td_10_12width=40height=40></TD>
<TDid=td_10_13width=40height=40></TD>
<TDid=td_10_14width=40height=40></TD>
<TDid=td_10_15width=40height=40></TD>
<TDid=td_10_16width=40height=40></TD>
<TDid=td_10_17width=40height=40></TD></TR></TBODY></TABLE><BR>
<BR>
<SCRIPTlanguage=vbscript>
<!--

dimx,y
dimclickId
dimobj1,obj2,Flag1
dimNum1,Num2
dimmytime
dimMyrnd
dimx1,y1,x2,y2
Flag1=0
dimNumArray(10,17)
dimQuanArray(10,17)
dimLuJArray(10,17)
dimRTN,RTN1,RTN2
dimtotalNum,lastNum
lastNum=0

'初始化数字数组开始
forx=0to10
fory=0to17
numArray(x,y)=0
QuanArray(x,y)=0
next
next
'初始化数字数组结束

forx=1to9
fory=1to16
window.execScript"td_"&X&"_"&y&".innerText="&chr(34)&"0"&chr(34),"vbs"
next
next

'随便放些数字开始
do
randomize
RndX=cint(rnd*9)+1
randomize
Rndy=cint(rnd*16)+1
randomize
Myrnd=cint(rnd*30)+1
window.execScript"lastNum=td_"&RndX&"_"&Rndy&".innerText","vbs"

iflastNum="0"then
window.execScript"td_"&RndX&"_"&Rndy&".innerText="&Myrnd,"vbs"
NumArray(RndX,Rndy)=Myrnd
totalNum=totalNum+1
do
randomize
RndX=cint(rnd*9)+1
randomize
Rndy=cint(rnd*16)+1
window.execScript"lastNum=td_"&RndX&"_"&Rndy&".innerText"
iflastNum="0"then
window.execScript"td_"&RndX&"_"&Rndy&".innerText="&Myrnd,"vbs"
NumArray(RndX,Rndy)=Myrnd
totalNum=totalNum+1
exitdo
endif
loop
endif
iftotalNum=16*9thenexitdo'如果生成了全部数字,那么退出
loop
'随便放些数字结束

subaaa(obj)
forx=0to10
fory=0to17
QuanArray(x,y)=0
next
next
ifobj1=obj.idthenexitsub'如果选择还是相同那么认为没选,跳出本过程

Flag1=Flag1+1
Flag1=Flag1mod3
RTN=fase
selectcaseFlag1
case0'什么也没选

case1
obj1=obj.id
Num1=obj.innerText
obj.bordercolor="#ff0000"
temarray=split(obj1,"_")
x1=cint(temarray(1))
y1=cint(temarray(2))
case2
obj2=obj.id
Num2=obj.innerText
obj.bordercolor="#ff0000"
temarray=split(obj2,"_")
x2=cint(temarray(1))
y2=cint(temarray(2))
ifNum1=Num2then
RTN1=CheckLink(x1,y1,x2,y2)

ifRTN1=truethen
Dispearx1,y1,x2,y2
Flag1=0
else
'恢复
Flag1=0
window.execScript"td_"&x1&"_"&y1&".bordercolor="&chr(34)&"#00FF66"&chr(34),"vbs"
window.execScript"td_"&x2&"_"&y2&".bordercolor="&chr(34)&"#00FF66"&chr(34),"vbs"
endif
else
'恢复
Flag1=0

window.execScript"td_"&x1&"_"&y1&".bordercolor="&chr(34)&"#00FF66"&chr(34),"vbs"
window.execScript"td_"&x2&"_"&y2&".bordercolor="&chr(34)&"#00FF66"&chr(34),"vbs"


endif
endselect


endsub


functionCheckLink(xx1,yy1,xx2,yy2)
RTN=false
forx=0to10
fory=0to17
QuanArray(x,y)=0
next
next
QuanArray(xx1,yy1)=1
RTN2=gogogogo(xx1,yy1)
CheckLink=RTN

endfunction

functiongogogogo(xx,yy)
'vartype(xx)&"!"&xx&"-"&yy&"*"&vartype(x2)&"!"&x2&"-"&y2
'msgboxxx&"-"&yy
'ifxx<=10andxx>=0andyy<=17andyy>=0then
'window.execScript"td_"&xx&"_"&yy&".innertext="&chr(34)&"#"&chr(34),"vbs"
'window.execScript"td_"&xx&"_"&yy&".bordercolor="&chr(34)&"#0000ff"&chr(34),"vbs"
'endif
ifvartype(xx)<>2thenxx=cint(xx)
ifvartype(yy)<>2thenyy=cint(yy)
ifvartype(x2)<>2thenx2=cint(x2)
ifvartype(y2)<>2theny2=cint(y2)

ifRTN=truethen
gogogogo=true
exitfunction
endif
if(xx+1=x2andyy=y2)or(xx-1=x2andyy=y2)or(yy+1=y2andxx=x2)or(yy-1=y2andxx=x2)then'先判断四周是不是
'连到了的选项
gogogogo=true
RTN=true
exitfunction
else'这里是已经判断了四周不是

'向下开始
ifxx+1<=10then'是否碰壁
ifnot(xx+1=x2andyy=y2)then'是否连到了
ifnumArray(xx+1,yy)=0then'是否碰到了别的图片
'这里是空地,如果空地的其余三面连接目标图片,那么就结束了,ok!
if(xx+2=x2andyy=y2)or(xx+1=x2andyy+1=y2)or(xx+1=x2andyy-1=y2)then
'连到了的选项

gogogogo=true
RTN=true

exitfunction
else
'这里是空地但是还没连上目标mm
ifQuanArray(xx+1,yy)=0then'是否已经来过此地
'连通空地,继续走继续朝前走的选项
QuanArray(xx+1,yy)=1'撒尿标记:老孙从这个方向到此一游!
RTN2=gogogogo(xx+1,yy)'继续去取经
else
'来过了
endif
endif
else
'碰到了别的图片,和碰壁查不多
endif
else
'连到了的选项
gogogogo=true
RTN=true
exitfunction
endif
else
'碰壁了
endif
'向下结束
'向上开始
ifxx-1>=0then'是否碰壁
ifnot(xx-1=x2andyy=y2)then'是否连到了
ifnumArray(xx-1,yy)=0then'是否碰到了别的图片
'这里是空地,如果空地的其余三面连接目标图片,那么就结束了,ok!
if(xx-2=x2andyy=y2)or(xx-1=x2andyy+1=y2)or(xx-1=x2andyy-1=y2)then
'连到了的选项

gogogogo=true
RTN=true

exitfunction
else
'这里是空地但是还没连上目标mm
ifQuanArray(xx-1,yy)=0then'是否已经来过此地
'连通空地,继续走继续朝前走的选项
QuanArray(xx-1,yy)=2'撒尿标记:老孙从这个方向到此一游!
RTN2=gogogogo(xx-1,yy)'继续去取经
else
'来过了
endif
endif
else
'碰到了别的图片,和碰壁查不多
endif
else
'连到了的选项
gogogogo=true
RTN=true
exitfunction
endif
else
'碰壁了
endif
'向上结束
'向左开始
ifyy-1>=0then'是否碰壁
ifnot(yy-1=y2andxx=x2)then'是否连到了
ifnumArray(xx,yy-1)=0then'是否碰到了别的图片
'这里是空地,如果空地的其余三面连接目标图片,那么就结束了,ok!
if(xx=x2andyy-2=y2)or(xx+1=x2andyy-1=y2)or(xx-1=x2andyy-1=y2)then
'连到了的选项

gogogogo=true
RTN=true

exitfunction
else
'这里是空地但是还没连上目标mm
ifQuanArray(xx,yy-1)=0then'是否已经来过此地
'连通空地,继续走继续朝前走的选项
QuanArray(xx,yy-1)=4'撒尿标记:老孙从这个方向到此一游!
RTN2=gogogogo(xx,yy-1)'继续去取经
else
'来过了
endif
endif
else
'碰到了别的图片,和碰壁查不多
endif
else
'连到了的选项
gogogogo=true
RTN=true
exitfunction
endif
else
'碰壁了
endif
'向左结束

'向右开始
ifyy+1<=17then'是否碰壁
ifnot(yy+1=y2andxx=x2)then'是否连到了
ifnumArray(xx,yy+1)=0then'是否碰到了别的图片
'这里是空地,如果空地的其余三面连接目标图片,那么就结束了,ok!
if(xx=x2andyy+2=y2)or(xx+1=x2andyy+1=y2)or(xx-1=x2andyy+1=y2)then
'连到了的选项

gogogogo=true
RTN=true

exitfunction
else
'这里是空地但是还没连上目标mm
ifQuanArray(xx,yy+1)=0then'是否已经来过此地
'连通空地,继续走继续朝前走的选项
QuanArray(xx,yy+1)=3'撒尿标记:老孙从这个方向到此一游!
RTN2=gogogogo(xx,yy+1)'继续去取经
else
'来过了
endif
endif
else
'碰到了别的图片,和碰壁查不多
endif
else
'连到了的选项
gogogogo=true
RTN=true
exitfunction
endif
else
'碰壁了
endif
'向右结束

endif
endfunction




subDispear(xx1,yy1,xx2,yy2)'处理消失的模块
window.execScript"td_"&xx1&"_"&yy1&".innerText="&chr(34)&chr(34),"vbs"
window.execScript"td_"&xx2&"_"&yy2&".innerText="&chr(34)&chr(34),"vbs"
window.execScript"td_"&xx1&"_"&yy1&".bordercolor="&chr(34)&"#00FF66"&chr(34),"vbs"
window.execScript"td_"&xx2&"_"&yy2&".bordercolor="&chr(34)&"#00FF66"&chr(34),"vbs"
NumArray(xx1,yy1)=0
NumArray(xx2,yy2)=0

endsub

'5分钟
eee
dimSucced
subeee()
Succed=true
window.setTimeout"eee","1000"
mytime=mytime+1
Showmytime.innerText=mytime



ifmytime>=10*60then
msgbox"抱歉,10分钟时间已经到了!重来"
window.location.href="link.htm"
else
myproc1.width=mytime
myproc2.width=600-mytime
endif
forx=1to9
fory=1to16
ifNumArray(x,y)<>0then
Succed=false
exitfor
endif
next
ifNumArray(x,y)<>0then
Succed=false
exitfor
endif
next
ifSucced=truethen
Succed=false
msgbox"恭喜你,辛苦了!,你用了"&mytime&"秒时间,继续!"
window.location.href="addlink.asp?time="&mytime
exitsub
endif
endsub
Subdocument_onselectstart
document.selection.clear
EndSub
-->
</SCRIPT>

<Pid=ppp></P></BODY></HTML>