日期:2014-05-17  浏览次数:20493 次

JS 纠错 在线等
poly1 = div.appendChild(document.createElement("<v:shape alt='" + name + "' path='m0,0 10,0 ' filled='true' style='POSITION:absolute;z-index:1;CURSOR:hand;left:" + zb[0] + ";top:" + zb[1] + ";width:100;height:100;filter:Alpha(Opacity=1);' strokeweight='1.2' coordsize='100,100' onmouseout='removeStyle(this)' onmouseover='getStyle(this)' onclick=\"showmess('" + name + "','" + address + "','" + lxr + "','" + phone + "','" + website + "','" + picUrl + "','" + jj + "','" + hotspot + "','" + bdunits + "');\" />"));

帮我看看这句代码有错没,我对了很久都没对出错来,但问题很可能出在这里,所以请大侠们帮帮忙了!

------解决方案--------------------
装个火狐 然后装个firebug 那个对JS调试比较友好 还可以断点。
------解决方案--------------------
JScript code

<v:shape alt='" + name + "' path='m0,0 10,0 ' filled='true' style=\"POSITION:absolute;z-index:1;CURSOR:hand;left:" + zb[0] + ";top:" + zb[1] + ";width:100;height:100;filter:Alpha(Opacity=1);\" strokeweight='1.2' coordsize='100,100' onmouseout='removeStyle(this)' onmouseover='getStyle(this)' onclick=\"showmess('" + name + "','" + address + "','" + lxr + "','" + phone + "','" + website + "','" + picUrl + "','" + jj + "','" + hotspot + "','" + bdunits + "');\" />
改了一点点 style这里用了转义

------解决方案--------------------
F11开发者工具,调试看