アットウィキロゴ

JQ canvas

<!DOCTYPE html>
<html>
 
<head>
<title>ABC</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
 
function sample() {
var canvas = document.getElementById('cam');
 
if (canvas.getContext) {
 
var context = canvas.getContext('2d');
 
context.fillRect(20,40,50,100); 
 
} 
}
 
</script>
 
</head>
<body onLoad="sample()">
<h2>図形を描く</h2>
<canvas id="cam"></canvas>
</body>
</html>
最終更新:2013年05月18日 01:21