请问一下点击chess时,为什么没有调用oneStep方法的??
var me=true;
var chessBoard=[];
for (var i = 0; i < 15; i++) {
chessBoard=[];
for (var j = 0; j < 15; j++) {
chessBoard[j]=0;
}
}
var chess=document.getElementById('chess');
var context=chess.getContext("2d");
context.strokeStyle="#bfbfbf";
var logo=new Image();
logo.src="nv.jpg";
logo.onload=function() {
context.drawImage(logo,0,0,450,450);
drawChessBoard();
oneStep(0,0,me);
oneStep(1,1,false);
}
var drawChessBoard=function(){
for (var i = 0; i |
免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。
版权声明:作者保留权利,不代表天盟立场。
|
|
|
|
chess.noclick=function(e){ 写错了吧,onclick |
|
|
|
|