诘屈聱牙之javascript中国象棋_Javascript教程-查字典教程网
诘屈聱牙之javascript中国象棋
诘屈聱牙之javascript中国象棋
发布时间:2016-12-30 来源:查字典编辑
摘要: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教程学习
    编程开发子分类