HTML5画矩形
">http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">>
<script><br />$(document).ready(function(){<br />var c=document.getElementById("drawbox");<br />var draw=c.getContext("2d"); //获取2d内容的引用,调用绘图API<br />draw.fillStyle="#ff0000"; //方式一指定填充颜色<br />draw.fillRect(0,0,300,100); //坐标和长宽<br />draw.fillStyle="rgba(0,0,255,0.5)"; //方式二rgb+透明度<br />draw.fillRect(400,0,100,100); //坐标和长宽<br />})<br /></script>