為什么我的不能畫圖呢
var chess = document.getElementById('chess');
var context = chess.getContext('2d');
context.stroke();
context.moveTo(0,0);
context.lineTo(450,450);
var chess = document.getElementById('chess');
var context = chess.getContext('2d');
context.stroke();
context.moveTo(0,0);
context.lineTo(450,450);
舉報(bào)
2016-05-06
stroke()放在后面,當(dāng)你的路線設(shè)計(jì)好之后,在進(jìn)行繪畫,而不是一出來(lái)就繪畫