HTMl 有个TABLE<TABLE style="TABLE-LAYOUT: fixed" id=Section2 cellSpacing=0 cellPadding=3 width="100%">
...
</TABLE>我现在需要在TABLE外加层DIV 即变成
<div id="test">
<TABLE style="TABLE-LAYOUT: fixed" id=Section2 cellSpacing=0 cellPadding=3 width="100%">
...
</TABLE>
</div>我写的JS如下:
var obj = document.getElementById("Section2");
obj.insertAdjacentHTML("beforeBegin", "<div id="test">");但发现不对高手求解
...
</TABLE>我现在需要在TABLE外加层DIV 即变成
<div id="test">
<TABLE style="TABLE-LAYOUT: fixed" id=Section2 cellSpacing=0 cellPadding=3 width="100%">
...
</TABLE>
</div>我写的JS如下:
var obj = document.getElementById("Section2");
obj.insertAdjacentHTML("beforeBegin", "<div id="test">");但发现不对高手求解
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货