js的代码window.onload = function () {var chess = document.getElementById('chess');var context = chess.getContext('2d');context.srtokeStyle = "#BFBFBF";context.moveTo(0,0);context.lineTo(450,450);context.stroke();}index的代码<!DOCTYPE html><html><head><meta charset="UTF-8"><title>五子棋</title><link rel="stylesheet" type="text/css" href="CSS/style.css"></head><body><canvas id = "chess" width = "450px" height = "450px"></canvas><script type="text/javascript" scr="js/script.js"></script></body></html>
添加回答
举报
0/150
提交
取消