window.onload=function(){ var canvas=document.getElementById("draw"); //$("#draw")不可用 var context=canvas.getContext("2d"); context.moveTo(10,10); context.lineTo(100,100); context.stroke(); }
原文地址:https://www.cnblogs.com/tomatofjy/p/11641812.html
时间: 2024-10-31 04:40:38