您的位置:首页 > Web前端 > JavaScript

中国象棋js代码,仅演示,未能真下

2008-02-19 23:12 831 查看

中国象棋js代码,仅演示,未能真下

 更新时间:2008年02月19日 23:12:02   作者:   我要评论

中国象棋js代码,仅演示,未能真下 www.jb51.net 中国象棋 脚本之家" st+=""+qizhiname+"" } function hengxian(qizhix) { qizhix=qizhix*50+25; st+="" } function shuxian(qizhix) { qizhix=qizhix*50+25; st+="" } function point(x,y) { var x,y; st+="" } function linehengc(top,left) { var top,left; top=50*top+20; left=50*left+15; for(var y=0;y=qipuid.length) { alert("现在封盘,下次再继续") return } qizhimove(qipuid[qipuc],qipux[qipuc],qipuy[qipuc]) qipuc++; } function qizhimove(id,x2,y2) { var id,x,y,x2,y2; x2=x2*50; y2=y2*50; luozhi=false; eval("x1=document.getElementById('a"+id+"').style.top"); re=/px/i; x1= x1.replace(re, ""); eval("y1=document.getElementById('a"+id+"').style.left"); re=/px/i; y1= y1.replace(re, ""); qizhimoveloop(id,x1*1,y1*1,x2,y2); } function qizhimoveloop(id,x,y,x2,y2) { var id,x,y; eval("document.getElementById('a"+id+"').style.top='"+x+"px'"); eval("document.getElementById('b"+id+"').style.top='"+(x+10)+"px'"); eval("document.getElementById('a"+id+"').style.left='"+y+"px'"); eval("document.getElementById('b"+id+"').style.left='"+(y+10)+"px'"); if(x!=x2) { if (x>x2) x-=2; if (xy2) y-=2; if (y " } function start() { for(var x=1;x
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  中国象棋 js