为什么我的对角线实现不了
JS代码:
var chess = document.getElementById('chees');
var context = chess.getContext('2d');
context.strokeStyle="#BFBFBF";
context.moveTo(0,0);
context.lineTo(450,450);
context.stroke();
HTML代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>五子棋</title>
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<canvas id="chess" width="450px" height="450px"></canvas>
<script type="text/javascript" src="js/script.js" ></script>
</body>
</html>