代码错误 cxt.fillStyle那一行Cannot set property 'fillStyle' of undefined
function renderDight (x,y,num,cxt) { cxt.fillStyle = "#005588"; for(var i = 0;i<digit[num].length;i++){ for(var j=0;j<digit[num][i].length;j++){ if(digit[num][i][j] == 1){ cxt.beginPath(); //第(i,j)个圆的圆心位置: //CenterX:x + j*2*(R+1)+(R+1) //CenterY:y + i*2*(R+1)+(R+1) cxt.arc(x+j*2*(RADIUS+1)+(RADIUS+1),y+i*2*(RADIUS+1)+(RADIUS+1),RADIUS,0,2*Math.PI); cxt.closePath(); cxt.fill(); } } } }