求大神看看代码哪里错了 一直画不出线条
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div id="canvas-warp" style="border:1px solid #aaaaaa;display:block;margin:50px auto;">
</canvas>
</div>
<script>
window.onload=function(){
var canvas=document.getElementById("canvas");
canvas.width=800;
canvas.height=800;
var context=canvas.getContext("2d");
context.moveTo(100,100);
context.lineTo(300,300);
context.lineWidth=5;
context.strokeStyle="#AA394C";
context.stroke();
}
</script>
</body>
</html>