IE11不支持
亚细亚 2020-09-27 05:30:48 在IE11中浏览一片空白;
<body >
<canvas id="myCanvas" width="500" height="300"> Fallback content, in case the browser does not support Canvas.</canvas>
<script>
function draw(){
var canvas=document.getElementById("myCanvas")
var ctx=canvas.getContext('2d');
ctx.fillStyle="rgb(0,0,200)"
ctx.fileRect(0,0,100,100);
}
window.onload=function()
{
draw()
}
</script>
</body>