问答详情
源自:1-2 绘制米字格,复习canvas

JavaScript无法设置宽高

设置不了,求解答

提问者:慕的地3472395 2016-05-18 23:07

个回答

  • 慕用0418482
    2016-05-19 16:04:25

    getElementById('canvas').setAttribute("width","400px");

    getElementById('canvas').setAttribute("height","400px");