Yjavascript テスト 新しいページはコチラ

提供: yonewiki
移動: 案内, 検索
(ページの作成:「<yjavascript> onload = function() { draw1(); }; - 円を描く: function draw1() { var canvas = document.getElementById('c1'); if ( ! canvas || ! canvas.getCont...」)
 
 
2行: 2行:
 
onload = function() {
 
onload = function() {
 
   draw1();
 
   draw1();
 
 
};
 
};
 
/* 円を描く */
 
/* 円を描く */
 
function draw1() {
 
function draw1() {
 
   var canvas = document.getElementById('c1');
 
   var canvas = document.getElementById('c1');
   if ( ! canvas || ! canvas.getContext ) { return false; }
+
   if ((! canvas) ||(! canvas.getContext)) { return false; }
 
   var ctx = canvas.getContext('2d');
 
   var ctx = canvas.getContext('2d');
 
   ctx.beginPath();
 
   ctx.beginPath();
43行: 42行:
 
}
 
}
 
</yjavascript>
 
</yjavascript>
 +
<ycanvas id="c1" width="1098" height="140"></ycanvas>

2016年3月15日 (火) 00:00時点における最新版



個人用ツール
名前空間

変種
操作
案内
ツールボックス