<style><!--
#container{
background-color:#C7C7C7;
}
--></style>
<div id="container"> </div>
<p>
<script type="text/javascript">// <![CDATA[
window.addEventListener("load",eventWindowLoaded,false);
function eventWindowLoaded(){
canvasApp();
}
function canvasApp(){
document.getElementById("container").innerHTML="<canvas id='canvas_one' width='500' height='300'>浏览器不支持Html5 Canvas</canvas>";
var theCanvas=document.getElementById("canvas_one");
if(!theCanvas||!theCanvas.getContext){return;}
var context=theCanvas.getContext("2d");
function drawScreen(){
context.fillStyle="#FF0000";
context.fillRect(0,0,150,75);
}
drawScreen();
}
// ]]></script>
</p>