正文  软件开发 > html5 >

循环,

循环,var canvas = $("#gameCanvas"); var context = canvas.get(0).getContext("2d"); //画布尺寸 var canvas...

循环,

var canvas = $("#gameCanvas");
var context = canvas.get(0).getContext("2d");

//画布尺寸
var canvasWidth = canvas.width();
var canvasHeight = canvas.height();

function animate() {
     setTimeout(animate,1000);
  }
animate();

http://www.bkjia.com/HTML5/1223536.htmlwww.bkjia.comtruehttp://www.bkjia.com/HTML5/1223536.htmlTechArticle循环, var canvas = $("#gameCanvas" ); var context = canvas.get(0).getContext("2d" ); // 画布尺寸 var canvasWidth = canvas.width(); var canvasHeight = canvas.height(); funct...