• 把网页内容全部导入word


    <!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- 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中调试用,知道的能否告知下

    Top
    收藏
    关注
    评论
  • 相关阅读:
    关于两次fork
    阻塞非阻塞与同步异步的区别
    函数调用堆栈
    数组
    64位操作系统与32位操作系统数据类型的字节数
    Redis 键(key)
    Redis 命令
    Redis 安装
    Redis 配置
    MongoDB 安装
  • 原文地址:https://www.cnblogs.com/smiler/p/1712762.html
Copyright © 2020-2023  润新知