推箱子游戏(共31关)-1

发表于:2008-05-30来源:作者:点击数: 标签:箱子游戏
关键字: Java Script 箱子游戏 box.htm: !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" HTML HEAD TITLE推箱子游戏/TITLE META NAME="Generator" CONTENT="EditPlus" META NAME="Author" CONTENT="dolphin" META NAME="Keywords" CONTENT=
关键字:JavaScript 箱子游戏

box.htm:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>推箱子游戏</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="dolphin">
<META NAME="Keywords" CONTENT="推箱子,搬运工,Box">
<META NAME="Description" CONTENT="推箱子游戏">
<STYLE TYPE="text/css">
<!--
.Ground{background-color: #007300}
.Wall{border:1px outset #clearcase/" target="_blank" >cccccc;background-color:#cccccc;z-index:0;background: url(wall.bmp)}
.Aim{background-color:#FFFFFF;filter:Alpha(opacity=100,FinishOpacity=5,Style=3);z-index:0}
.Box{background-color:#FFFFFF;filter:Alpha(opacity=5,FinishOpacity=100,Style=3);z-index:1}
.Man{background-color:red;z-index:1;filter:filpv}
TD{font-size:12px;}
// -->
</STYLE>
<SCRIPT LANGUAGE="JavaScript" SRC="level_dat.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="box.js"></SCRIPT>
</HEAD>

<BODY>
<TABLE width="80%" align=center>
<TR>
 <TD valign=top>
  箱子移动:<input id=BoxMoveInfo readonly size=5> 步<br>
  人 移 动:<input id=ManMoveInfo readonly size=5> 步<br>
  当前关数:<input id=LevelInfo readonly size=5> 关
  <p>
   <input type=button value='撤销移动' onclick='UnDo()'><br><br>
   <input type=button value='重复移动' onclick='ReDo()'><br><br>
   <input type=button value='读取进度' onclick='LoadLevel()'><br><br>
   <input type=button value='保存进度' onclick='SaveLevel()'><br><br>
   <input type=button value='选择关数' onclick='CustomLevel()'><br><br>
  </p>
  <textarea id=Info rows=20 style="display:none"></textarea>
 </TD>
 <TD valign=top><span id=Base style='position:absolute;overflow:hidden'></span></TD>
</TR>
</TABLE>
</BODY>
</HTML>
box.js:
var useLevel = 0;

function window.onload(){
 //useLevel = GetCookie("Level");
 ReadMap(useLevel);
 document.body.scroll='no';
 function document.onkeydown(){
  switch(event.keyCode){
   case 37:Dir(-1,0,'l');break;//left
   case 38:Dir(0,-1,'u');break;//up
   case 39:Dir(1,0,'r');break;//right
   case 40:Dir(0,1,'d');break;//down
  }

原文转自:http://www.ltesting.net