为什么不显示第一条线
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>测试</title>
</head>
<body>
<canvas id="canvas" width = 1024 height = 768 style="border:1px solid #aaa;display:block;margin:50px auto;"></canvas>
<script>
window.onload = function(){
var canvas = document.getElementById("canvas");
canvas.width = 1024;
canvas.height = 768;
var context = canvas,getconText("2d")
//使用context绘制
context.moveTo(100,100)
context.lineTo(700,700)
context.stroke()
}
</script>
</body>
</html>