不能畫圖的報錯
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);
2016-05-06
舉報
2016-10-22
我也出現(xiàn)這種問題,id檢查了也沒有出錯
2016-05-06
報錯的意思是你的 chess 對象不存在,你檢查一下,是不是 id 打錯了。