zoukankan      html  css  js  c++  java
  • 在线编辑word文档代码

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml%22 > 
    <head runat="server"> 
    <title>在线编辑文档</title> 
    <script language="javascript" type="text/javascript"> 
    var __OpenDocuments = null ; 
    
    function documentEdit( url ) 
    { 
    if( __OpenDocuments == null ) { 
    try{ 
    __OpenDocuments = new ActiveXObject("SharePoint.OpenDocuments.3"); //for office 2007 
    } 
    catch(e){} 
    
    if( __OpenDocuments == null || typeof(__OpenDocuments) == "undefined" ) { 
    try{ 
    __OpenDocuments = new ActiveXObject("SharePoint.OpenDocuments.2"); //for office 2003 
    } 
    catch(e){} 
    } 
    
    if( __OpenDocuments == null || typeof(__OpenDocuments) == "undefined" ) { 
    alert( "请安装Word(2003或更高版本)" ); 
    return ; 
    } 
    } 
    var result = __OpenDocuments.EditDocument( url , "Word.Document" ); 
    
    if( result == false ) { 
    alert( "无法打开文档." ); 
    } 
    } 
    </script> 
    </head> 
    <body> 
    <form id="form1" runat="server"> 
    <div> 
    <input type="button" value="打开文档" onclick="documentEdit('http://moss07/ty/test/新建.doc');return false;" /> 
    <a href="#"  onclick="documentEdit('http://moss07/ty/test/新建.doc');return false;">点击</a>
    </div> 
    </form> 
    </body> 
    </html>
    

      

  • 相关阅读:
    Leecode刷题之旅-C语言/python-67二进制求和
    maven 聚合
    maven 继承
    maven 常用命令
    maven 术语
    maven安装
    RabbitMQ 消费消息
    RabbitMQ 生产消息并放入队列
    RabbitMQ 在 web 页面 创建 exchange, queue, routing key
    mybatis 通过实体类进行查询
  • 原文地址:https://www.cnblogs.com/gxbk629/p/3584794.html
Copyright © 2011-2022 走看看