Cannot read property 'width' of undefined
var dom=document.getElementById('clock');
var ctx=dom.getContext('2d');
var width=ctx.canves.width;
var height=ctx.canves.height;
var r=width/2;
function drawbackground() {
ctx.translate(r,r);
ctx.beginPath();
ctx.lineWidth=10;
ctx.arc(0,0,r-5,Math.PI,false)
ctx.stroke();
ctx.closePath();
// body...
}
drawbackground();
为什么会报这个的错误,想不明白