代码如下:<html> <body> [removed] function position (x,y){ this.x = x; this.y = y; } var canvas = document.getElementById(‘canvas’),