没有效果呀,怎么办
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<canvas id="canvas" style="border: 2px solid #000000;">
</canvas>
<!--<script type="text/javascript" src="js/jquery-1.11.0.js" ></script>-->
<script>
window.onload=function (){
var canvas=document.getElementById('canvas');
canvas.width=1024;
canvas.height=768;
//调整浏览器兼容性问题
if(canvas.getContext('2d')){
var context=canvas.getContext('2d');
context.moveTo(100,100)
content.lineTo(800,800)
context.lineWidth(5)
context.strokeStyle='aqua'//颜色是字符串
context.stroke()
}
else{
alert('浏览器不兼容,请选择其他浏览器谢谢!');
}
}
</script>
</body>
</html>