<script type="text/JavaScript">
function jsCopy(){
var e=document.getElementById("contents");//对象是contents
e.select(); //选择对象
document.execCommand("Copy"); //执行浏览器复制命令
}
</script>
<textarea id="contents" cols="40" rows="5"></textarea>
<br />
<input type="button" onClick="jsCopy();" value="复制" />
//相当于单击文件中的打开按钮 document.execCommand(”Open”); //将当前页面另存为 document.execCommand(”SaveAs”); //剪贴选中的文字到剪贴板; document.execCommand(”Cut”,”false”,null); //删除选中的文字; document.execCommand(”Delete”,”false”,null); //改变选中区域的字体; document.execCommand(”FontName”,”false”,sFontName); //改变选中区域的字体大小; document.execCommand(”FontSize”,”false”,sSize|iSize); //设置前景颜色; document.execCommand(”ForeColor”,”false”,sColor); //使绝对定位的对象可直接拖动; document.execCommand(”2D-Position”,”false”,”true”); //使对象定位变成绝对定位; document.execCommand(”AbsolutePosition”,”false”,”true”); //设置背景颜色; document.execCommand(”BackColor”,”false”,sColor); //使选中区域的文字加粗; document.execCommand(”Bold”,”false”,null); //复制选中的文字到剪贴板; document.execCommand(”Copy”,”false”,null); //设置指定锚点为书签; document.execCommand(”CreateBookmark”,”false”,sAnchorName); //将选中文本变成超连接,若第二个参数为true,会出现参数设置对话框; document.execCommand(”CreateLink”,”false”,sLinkURL); //设置当前块的标签名; document.execCommand(”FormatBlock”,”false”,sTagName); //相当于单击文件中的打开按钮 document.execCommand(”Open”); //将当前页面另存为 document.execCommand(”SaveAs”); //剪贴选中的文字到剪贴板; document.execCommand(”Cut”,”false”,null); //删除选中的文字; document.execCommand(”Delete”,”false”,null); //改变选中区域的字体; document.execCommand(”FontName”,”false”,sFontName); //改变选中区域的字体大小; document.execCommand(”FontSize”,”false”,sSize|iSize); //设置前景颜色; document.execCommand(”ForeColor”,”false”,sColor); //使绝对定位的对象可直接拖动; document.execCommand(”2D-Position”,”false”,”true”); //使对象定位变成绝对定位; document.execCommand(”AbsolutePosition”,”false”,”true”); //设置背景颜色; document.execCommand(”BackColor”,”false”,sColor); //使选中区域的文字加粗; document.execCommand(”Bold”,”false”,null); //复制选中的文字到剪贴板; document.execCommand(”Copy”,”false”,null); //设置指定锚点为书签; document.execCommand(”CreateBookmark”,”false”,sAnchorName); //将选中文本变成超连接,若第二个参数为true,会出现参数设置对话框; document.execCommand(”CreateLink”,”false”,sLinkURL); //设置当前块的标签名; document.execCommand(”FormatBlock”,”false”,sTagName);
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有