<html>
<span id ="textcopy">
要拷贝的内容
</span>
<script language='javascript'>
var rng = document.body.createTextRange();
rng.moveToElementText(document.all.textcopy);
rng.scrollIntoView();
rng.select();
rng.execCommand("Copy");
rng.collapse(false);
try{
var wApp = new ActiveXObject("Word.Application");
wApp.visible = true ;
wApp.Documents.add();
wApp.Selection.PasteSpecial();
}
catch(e)
{
alert ("请正确安装Word或设置IE的安全选项!");
}
</script>
<span id ="textcopy">
要拷贝的内容
</span>
<script language='javascript'>
var rng = document.body.createTextRange();
rng.moveToElementText(document.all.textcopy);
rng.scrollIntoView();
rng.select();
rng.execCommand("Copy");
rng.collapse(false);
try{
var wApp = new ActiveXObject("Word.Application");
wApp.visible = true ;
wApp.Documents.add();
wApp.Selection.PasteSpecial();
}
catch(e)
{
alert ("请正确安装Word或设置IE的安全选项!");
}
</script>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货