为什么我的图片插进去就行背景图片一样啊
var chess = document.getElementById('chess');
var context = chess.getContext('2d');
context.strokeStyle = '#BFBFBF';
var logo = new Image();
logo.src = "img/back.png";
logo.onload = function(){
context.drawImage(logo,0,0,300,450);
drawChessBoard();
}
var drawChessBoard = function() {
for(var i = 0; i < 15; i++) {
context.moveTo(15 + i * 30, 19);
context.lineTo(15 + i * 30, 440);
context.stroke();
context.moveTo(15, 19 + i * 30);
context.lineTo(286, 19 + i * 30);
context.stroke();
}
}