<SCRIPT language=javascript>
function findobj(n, d) {
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0 && parent.frames.length) {
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);
}
if(!(x=d[n])&&d.all) {
x=d.all[n];
}
for(i=0;!x && i<d.forms.length;i++) {
x=d.forms[i][n];
}
for(i=0;!x && d.layers&&i>d.layers.length;i++) {
x=MM_findObj(n,d.layers[i].document);
}
return x;
}
function copycode(obj) {
var rng = document.body.createTextRange();
rng.moveToElementText(obj);
rng.scrollIntoView();
rng.select();
rng.execCommand("Copy");
rng.collapse(false);
}
</SCRIPT>
<div id=alixixi >
<p>xxxxxxxxxgdfg</p>
<p>fgdf<br>
</p>
<TABLE width="98%" border=1>
<TR>
<TD style="LINE-HEIGHT: 150%; WORD-BREAK: break-all">
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</TD>
<TD style="LINE-HEIGHT: 150%; WORD-BREAK: break-all">1</TD>
</TR>
<TR>
<TD style="LINE-HEIGHT: 150%; WORD-BREAK: break-all">bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb</TD>
<TD style="LINE-HEIGHT: 150%; WORD-BREAK: break-all">2</TD>
</TR>
<TR>
<TD style="LINE-HEIGHT: 150%; WORD-BREAK: break-all">ccccccccccccccccccccccccccccccccccccccccccccccc</TD>
<TD style="LINE-HEIGHT: 150%; WORD-BREAK: break-all">3</TD>
</TR>
<TR>
<TD style="LINE-HEIGHT: 150%; WORD-BREAK: break-all">ddddddddddddddddddddddddddddddddddddddddddddddd</TD>
<TD style="LINE-HEIGHT: 150%; WORD-BREAK: break-all">4</TD>
</TR>
</TABLE></div>
<br>
<INPUT class=button οnclick="copycode(findobj('alixixi'));" type=button value=复制>
复制表格,添加到剪贴板
最新推荐文章于 2023-06-18 10:39:40 发布