function createRoundRect(x,y,w,h,T)//矩形 (xy)中心点 w宽h高
{
var strElement ="<v:RoundRect style='width:"+w+"px;height:"+h+"px;top="+(y)+"px;left="+(x)+"px;z-index:20' title='"+T+"' arcsize='0.2' strokecolor='red' fill='true' fillcolor='yellow'></v:RoundRect>"
   var strElement1="<v:shadow on='T' type='single' color='#b3b3b3' offset='5px,5px'/>"
   var newPoint = document.createElement(strElement);
newPoint.insertAdjacentHTML("afterBegin",strElement1)
group1.insertBefore(newPoint);
}

解决方案 »

  1.   

    function createRoundRect(x,y,w,h,T)//生成矩形 (xy)顶点 w宽h高
    {
    var strElement ="<v:RoundRect style='width:"+w+"px;height:"+h+"px;top="+(y)+"px;left="+(x)+"px;z-index:20' title='"+T+"' arcsize='0.2' strokecolor='red' fill='true' fillcolor='yellow'>"
        strElement+="</v:RoundRect>"
    var newPoint = document.createElement(strElement);
    newPoint.innerHTML="<v:shadow on='T' type='single' color='#b3b3b3' offset='5px,5px'/><v:TextBox inset='5pt,5pt,5pt,5pt' style='font-size:10.2pt;'>Hello world!</v:TextBox>";
    group1.appendChild(newPoint);
    }