Uncaught TypeError: Failed to execute 'getContext' on 'HTMLCanvasElement': 1 argument required, but only 0 present. 这什么情况啊
我刚刚解决了
can1 = document.getElementById("canvas1");
ctx1 = can1.getContext("2d");
can2 = document.getElementById("canvas2");
ctx2 = can2.getContext("2d");
我也遇到这个问题了
can1 = document.getElementById("canvas1");
ctx1 = can1.getContext(); //这个地方报的错
can2 = document.getElementById("canvas2");
ctx2 = can2.getContext();
给完整代码。