<!doctype html>
<html>
<head>
<title>Canvas test</title>
</head>
<body>
<script type="text/javascript">
c = getElementById('canvas');
ctx = c.getContext("2d")'
ctx.fillRect(10,10,10,10);
</script>
<canvas id="canvas" height ="100" width = "100"></canvas>
</body>
</html>
我已经在Chrome和IE 9上试过了,它们都没有显示任何东西。你知道为什么不工作?为什么不显示此HTML5画布?
这可能是一些愚蠢的事情,我的朋友要求我张贴这个,因为他懒得注册,但我自己弄不明白。