Monday, 17 September 2012

copy This


<html>
<head>
<script type="application/javascript">
function draw() {
var canvas = document.getElementById("canvas");
cx = canvas.getContext("2d");
cx.fillStyle = "rgb(200,0,0)";
cx.fillRect (12, 12, 46, 46);
cx.strokeStyle = "rgb(0,200,0)"; cx.lineWidth = 5;
cx.strokeRect(10, 10, 50, 50);
}
</script>
</head>
<body onload="draw();">
<canvas id="canvas" width="150" height="150"></canvas>
</body>
</html>

No comments:

Post a Comment