手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >诘屈聱牙之javascript中国象棋
诘屈聱牙之javascript中国象棋
摘要:IE6.0Only非XHTML标准,可能IE7.0也看不了....哈哈蓝方先走*{font:24pxarial,"宋体";font-weig...

IE6.0Only

非XHTML标准,可能IE7.0也看不了....哈哈

蓝方先走

* { font:24px arial, "宋体"; font-weight:bold; color:white; cursor:default; } table { table-layout:fixed; border-collapse:collapse; position:absolute; left:50px; top:50px; } td { width:80px; height:80px; border:1px solid silver; color:black; text-align:center; line-height:80px; } img.i1 { width:78px; height:78px; } img.i2 { width:49px; height:49px; } img.i3 { width:25px; height:49px; } .chessman_red { background:url(/attachments/2007/3/29/20070329_2187cc5e9def581951f2v22EfdUSXQ7J.jpg); width:50px; height:50px; line-height:50px; text-align:center; } .chessman_blue { background:url(/attachments/2007/3/29/20070329_5caa80c54f776b93bd582BwraVRWXf43.jpg); width:50px; height:50px; line-height:50px; text-align:center; } var tb; var cch=new Array(); var his=new Array(); var players=["red","blue"]; var curPlayer=1; window.onload=function(){ document.onselectstart=function(){ return(false); } document.onclick=do_click; document.oncontextmenu=do_context; tb=document.createElement("table"); document.body.appendChild(tb); for(var i=0;ithis.y?y:this.y; for(var i=mi+1;ithis.x?this.x:x; ma=x>this.x?x:this.x; for(var i=mi+1;i4)return(false); if(cch[(this.y+y)/2*9+(this.x+x)/2])return(false); break; case "象": if(Math.abs(this.x-x)!=2||Math.abs(this.y-y)!=2||y4){ if(y-this.y!=-1)return(false); }else{ if(!((y-this.y==-1&&x==this.x)||(y==this.y&&Math.abs(this.x-x)==1)))return(false); } break; //}else{ if(ythis.y?this.y:y; ma=y>this.y?y:this.y; for(var i=mi+1;ithis.x?this.x:x; ma=x>this.x?x:this.x; for(var i=mi+1;ithis.y?this.y:y; ma=y>this.y?y:this.y; for(var i=mi+1;ithis.x?this.x:x; ma=x>this.x?x:this.x; for(var i=mi+1;i

【诘屈聱牙之javascript中国象棋】相关文章:

javascript中clipboardData对象用法

详解JavaScript中的表单验证

理解javascript封装

javascript中动态函数用法

javascript中attachEvent用法

javascript的函数第1/3页

浅析javascript函数表达式

删除javascript所创建子节点的方法

纯javascript制作日历控件

javaScript中with函数用法实例分析

精品推荐
分类导航