如下代码
function draw(t,c){
ctx.fillStyle=c;
ctx.fillRect(t%20*20+1,~~(t/20)*20+1,18,18);
}
document.onkeydown=function(e){
fx=sn[1]-sn[0]==(n=[-1,-20,1,20][(e||event).keyCode-37]||fx)?fx:n
};
在function传的参数 t c e 我也没有定义和赋值 是怎么使用的呢?
为什么 ctx.fillStyle=c;就是黑色了呢?