td.innerHTML=keys[2]+"</td><td style='text-align:right;'><img style='margin:0px 0px 0px 110px;cursor:hand; text-align:right;' src='ig_common/20071CLR20/Styles/Office2007Blue/WebTab/tabclose.gif' onclick='closeTab("" + tabItem.index+ "")'></td>" ;以下是实际结果
<TD class="MainTab_2 igwtTabSelectedBlue2k7" id="MainTabtd2" style="VISIBILITY: visible; WIDTH: 100px" noWrap align="center" height="22" unselectable="on" tabID="MainTab,2">测试哦</TD><//TD><TD style="TEXT-ALIGN: right"></TD><IMG style="MARGIN: 0px; CURSOR: hand; TEXT-ALIGN: right" onclick='closeTab("2")' src="http://localhost:2486/ig_common/20071CLR20/Styles/Office2007Blue/WebTab/tabclose.gif" /></TD><//TD></TD>
标红处就是所谓的INNERHTML了
<TD class="MainTab_2 igwtTabSelectedBlue2k7" id="MainTabtd2" style="VISIBILITY: visible; WIDTH: 100px" noWrap align="center" height="22" unselectable="on" tabID="MainTab,2">测试哦</TD><//TD><TD style="TEXT-ALIGN: right"></TD><IMG style="MARGIN: 0px; CURSOR: hand; TEXT-ALIGN: right" onclick='closeTab("2")' src="http://localhost:2486/ig_common/20071CLR20/Styles/Office2007Blue/WebTab/tabclose.gif" /></TD><//TD></TD>
标红处就是所谓的INNERHTML了
我就想+上这一段string啊。
你要把整个这个页面的源码都贴出来啊。比如你的 keys[2] 就不知道是什么东东~~~btw:up!
如果红色部分是innerHTML,那你要将之前innerHTML串开始的那个</td>和结尾的那个</td>去掉。