function drawRect(x1,y1,w,h){
var newRect=document.createElement('<v:rect filled="false" style="position:absolute;top:'+(y-h/2)+';left:'+(x-w/2+';width:"+w+";height:"+h></v:rect>');
document.body.insertBefore(newRect);
}
自己调试一下看看行不行
我没有判断边界问题,需要的话自己判断一下