基于HTML的简单画布 var canvas=document.getElementById("demo"); var cxt=canvas.getContext("2d"); var flag=0; canvas.onmousedown=function(evt){ evt=win