<body> <canvas id="canvas"></canvas> <script> var canvas=document.getElementById("canvas"); canvas.setAttribute('height',768); canvas.setAttribute("width",1024); // canvas.width="1024"; // canvas.height="738"; var context=canvas.getContext("2d"); console.log(context) </script> </body>
etAttribute('height',768)这种方法不支持ie8及以下浏览器,那么被注释掉的内容支持吗?
柠檬酸钠