把网页内容全部导入word

简介: .mainTitle        {            font-size: x-large;            font-weight: bold;            background-color: #FFFFFF;           ...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312">  
    <title></title>
    <style type="text/css">
        .mainTitle
        {
            font-size: x-large;
            font-weight: bold;
            background-color: #FFFFFF;
            color: #FF0000;
            text-align: center;
        }
        .mainFrame
        {
            border-top: 1px solid #FF0000;
            border-bottom: 1px solid #FF0000;
            border-width: 3px 0px 3px 0px;
            height: 454px;
            border-left-style: solid;
            border-right-style: solid;
        }
        .smallTitle
        {
            font-size: large;
            font-weight: bold;
        }
        .content
        {
            font-size: 14px;
            text-indent: 2em;
        }
    </style>

 <script language="JavaScript">
<!--
     function OpenWord() {
         document.getElementById("Button1").style.visibility = "hidden";
         Layer1.style.border = 0;
         word = new ActiveXObject('Word.Application');
         word.Application.Visible = true;
         var mydoc = word.Documents.Add('', 0, 1);
         myRange = mydoc.Range(0, 1);
         var sel = Layer1.document.body.createTextRange();
         sel.select();
         Layer1.document.execCommand('Copy');
         sel.moveEnd('character');
         myRange.Paste();
         location.reload();
         //word.ActiveWindow.ActivePane.View.Type=9;
     }
-->
</script>
   
</head>
<body>
 <div id="Layer1" >
    <p class="mainTitle">
        2010年第五期灾情档案</p>
    <div class="mainFrame">
        <br />
        <div>
            <span class="smallTitle">一、出灾地点范围: </span>
            <br />
            dsfdsfdsfdfdsfsfsdfsdfsdfsdfsdfsdfsdf
            <br />
            <br />
        </div>
        <div>
            <span class="smallTitle">二、灾情实况:</span>
            <br />
            <span class="content">dsfdsfdsf;lk;lk;lk;lkl;jkl;jhhjkhjklhjklh </span>
            <br />
            <br />
        </div>
        <div>
            <span class="smallTitle">二、灾情实况:</span>
            <br />
            <div class="content">
                张慧芳dsfdsfdsf
            </div>
            <br />
            <br />
        </div>
        <div>
            <span class="smallTitle">二、灾情实况:</span>
            <br />
            <span class="content">张慧芳dsfdsfdsfsdfdsfdsf </span>
            <br />
            <br />
        </div>
        <div>
            <span class="smallTitle">二、灾情实况:</span>
            <br />
            <span class="content">dsfdsfdsf dsfsdfsdfsdfsdfsdfsdf</span>
            <br />
            <br />
        </div>
    </div>
    <p>
  
        <input id="Button1" type="button" value="button" onclick="OpenWord()" /></p>
</div>
</body>
</html>

但我不知道为什么不能再vs中调试用,知道的能否告知下

目录
相关文章
|
6月前
|
Java
jsp页面中显示word/excel文档方法
jsp页面中显示word/excel文档方法
|
8月前
|
Python
Python3,2行代码,多种方法,直接把网页内容转换成PDF文档和图片。
Python3,2行代码,多种方法,直接把网页内容转换成PDF文档和图片。
157 0
通过python-docx给word文档中的指定位置添加表格
1.读取一个已有的word文档。docx格式。 2.在该word文档中,通过一个给定的文字。找到该位置。在该位置的下方添加一个表格。例如在图中“BUG情况表”的下方插入一个表格
2389 1
通过python-docx给word文档中的指定位置添加表格
|
4月前
|
存储
如何解决网页中的pdf文件无法下载?pdf打印显示空白怎么办?
如何解决网页中的pdf文件无法下载?pdf打印显示空白怎么办?
199 0
|
5月前
docx设置保存的word文档字体及大小
一般我是要将文件保存为这种形式我会使用
41 0
|
9月前
|
自然语言处理 Python
Python读取Word/PPT文件文本内容和图片内容
读取某个指定路径下的Word/PPT文件,并将其中所有的文本内容生成一个TXT文件,将所有的图片内容保存在一个文件夹里
265 0
|
API
Apose.word控件获取书签中的内容并复制到一个新的word文档中
Apose.word控件获取书签中的内容并复制到一个新的word文档中
298 0
Apose.word控件获取书签中的内容并复制到一个新的word文档中
|
Web App开发 XML Java
通过freemarker生成一个word,解决生成的word用wps打开有问题的问题,解决出word时中文文件名乱码问题,解决打开出word时打开的word出现问题的问题,出图片,解决动态列表
 通过freemarker制作word比较简单 步骤:制作word模板。制作方式是:将模板word保存成为xml----在xml的word模板中添加相应的标记----将xml的word文件的后缀名改成ftl文件(要注意的是生成xml格式要是2003格式的xml,也就是说拿到的word模板得是2003格式的,否则用wps打开word将会出现问题)   详细步骤如下: 模板制作(将要动态显示的
4524 0
|
Python
[日常]用Python读取word文档中的表格并比较
用Python3读取word文档中的表格并比较. Create a wubi encoding editor using Python with Chinese naming.
2970 0
|
数据采集 分布式数据库 Python