canvas之绘制矩形
<!DOCTYPE html>
<html>
<head>
<title>canvas-1</title>
</head>
<body>
<canvas id="c" width="200" height="200" style="border:1px solid #0066FF">
</canvas>
<script>
var c=document.getElementById('c');
var context=c.getContext("2d");
context.fillStyle="#FF00CC";
context.fillRect(50,50,100,100);
</script>
</body>
</html>