画直线部分有完整代码么
<!DOCTYPE html>
2 <html lang='zh-cn'>
3 <head>
4 <title>Insert you title</title>
5 <meta name='description' content='this is my page'>
6 <meta name='keywords' content='keyword1,keyword2,keyword3'>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8 <link rel='stylesheet' type='text/css' href='./css/index.css' />
9 <script type='text/javascript' src='./js/jquery-1.12.1.min.js'></script>
10 <style type='text/css'>
</style>
</canvas>
23 <script>
window.download=funcation(){
var canvas=document.getElementById("canvas");
25canvas id="canvas"
canvas.width=1024;
canvas.height=768;
var context=canvas.getContext('2d')
context.moveTo(100,100)
context.lineTo(700,700)
context.linewith=5;//线条宽度为5
context.strokestyle="#005588"//主要指线条颜色
context.stroke()
}
88 </script>
89 </head>
90 <body>
91 <canvas id='can' width='500' height='500'>您的浏览器版本过低,请升级您的浏览器...</canvas>
92 </body>
93 </html>