7,785
社区成员




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=100"> <!-- ie8 mode -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> New Document </title>
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body onload1="BodyOnLoadVb()">
<canvas style="width:300px;height:300px;" id="myCanvas" width="300" height="300" > </canvas>
<canvas style="width:300px;height:300px;" id="myCanvasVb" width="300" height="300" > </canvas>
</body>
<script type="text/javascript">
<!--
function BodyOnLoad(){
var canvas=document.getElementById('myCanvas');
var ctx= canvas.getContext('2d');
ctx.fillStyle="#99FF66";
ctx.fillRect(10,10,15,80);
ctx.fillStyle="#99FF66";
ctx.fillRect(60,10,15,80);
ctx.fillStyle="#0033CC";
ctx.fillRect(26,27,33,50);
ctx.fillStyle="red";
ctx.beginPath();
ctx.arc(43,52,17,0,Math.PI*2,true);
ctx.closePath();
ctx.fill();
ctx.strokeStyle="#CCCC00";
ctx.lineWidth=2;
ctx.moveTo(43,52);
ctx.lineTo(43,10);
ctx.stroke();
}
BodyOnLoad()
//-->
</script>
<script type="text/vbscript">
<!--
function BodyOnLoadVb()
Dim canvas
Set canvas=document.getElementById("myCanvasVb")
Dim ctx
Set ctx = canvas.getContext("2d")
ctx.fillStyle="#99FF66"
Call ctx.fillRect(10,10,15,80)
ctx.fillStyle="#99FF66"
Call ctx.fillRect(60,10,15,80)
ctx.fillStyle="#0033CC"
Call ctx.fillRect(26,27,33,50)
ctx.fillStyle="red"
call ctx.beginPath()
call ctx.arc(43,52,17,0,Math.PI*2,true)
call ctx.closePath()
call ctx.fill()
ctx.strokeStyle="#CCCC00"
ctx.lineWidth=2
call ctx.moveTo(43,52)
call ctx.lineTo(43,10)
call ctx.stroke()
'msgbox typename(ctx)
End Function
call BodyOnLoadVb()
//-->
</script> </html>