weboffice.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>在线office测试页面</title>
  6. <meta name="description" content="">
  7. <meta name="keywords" content="">
  8. <!--include header base-->
  9. <meta name="author" content="Roobo:F2E">
  10. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  11. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  12. <!-- Set render engine for 360 browser -->
  13. <meta name="renderer" content="webkit">
  14. <!-- Add to homescreen for Chrome on Android -->
  15. <meta name="mobile-web-app-capable" content="yes">
  16. <!--<link rel="icon" type="image/png" sizes="192x192" href="img/favicon/android-icon-192x192.png">-->
  17. <!-- Add to homescreen for Safari on iOS -->
  18. <meta name="apple-mobile-web-app-capable" content="yes">
  19. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  20. <!--<link href="../css/css.css" rel="stylesheet" type="text/css">-->
  21. <script src="../js/config/base_config.js"></script>
  22. <script src="/js/lib/jquery-1.9.1/jquery.min.js"></script>
  23. <SCRIPT language="javascript" src="cssjs/weboffice.js" charset="utf-8"></SCRIPT>
  24. <script type="text/javascript">
  25. $(document).ready(function(){
  26. WebOpen(); //等待控件加载
  27. testForm.WebOffice.IsNotCopy=0;
  28. });
  29. function htmltoWord(){
  30. $("#testForm").attr("action",baseConfig.URL.htmlToWord);
  31. $('#testForm').submit();
  32. }
  33. //
  34. // $.ajax( {
  35. // url: baseConfig.URL.exportFile,
  36. // dataType: 'json',
  37. // type: 'post',
  38. // data:$("#testForm").serialize(),
  39. // success : function(data,textStatus) {
  40. // console.log(data);
  41. // },
  42. // error : function() {
  43. // alert("404");
  44. // }
  45. // });
  46. function formSubmit(){
  47. $("#scontext").val($("#scontext").val());
  48. alert($("#scontext").val());
  49. $("#testForm").attr("action",baseConfig.URL.saveXHeditor);
  50. $('#testForm').submit();
  51. }
  52. function callback(objStatus){
  53. alert(objStatus);
  54. }
  55. </script>
  56. </head>
  57. <body >
  58. <iframe name="hidden_frameFile" id="hidden_frameFile" style="display:none"></iframe>
  59. <form name="testForm" id="testForm" action="/test/save" method="post" target="hidden_frameFile" >
  60. <a href="#" onclick="WebMenubar(false)">关闭菜单栏</a>
  61. <a href="#" onclick="WebMenubar(true)">打开菜单栏</a>
  62. <a href="#" onclick="WebTitlebar(false)">打开菜单栏</a>
  63. <a href="#" onclick="WebTitlebar(true)">打开菜单栏</a>
  64. <a href="#" onclick="WebToolbar(false)">打开菜单栏</a>
  65. <a href="#" onclick="WebToolbar(true)">打开菜单栏</a>
  66. <a href="#" onclick="testForm.WebOffice.IsNotCopy=0;">开启功能</a>
  67. <a href="#" onclick="testForm.WebOffice.IsNotCopy=1;">关闭功能</a>
  68. <br><input type="button" onclick="fileExport()" value="导出"/>
  69. <OBJECT width="100%" height="400" id="WebOffice" classid="clsid:FF09E4FA-BFAA-486E-ACB4-86EB0AE875D5" codebase="WebOffice.ocx#Version=2017,1,6,2">
  70. <PARAM name="BorderStyle" value="0">
  71. <PARAM name="Caption" value="Office文档控件">
  72. <PARAM name="BorderColor" value="10000">
  73. <PARAM name="BorderStyle" value="1">
  74. <PARAM name="TitlebarColor" value="52479">
  75. <PARAM name="TitlebarTextColor" value="0">
  76. <PARAM name="Menubar" value="1">
  77. <PARAM name="ForeColor" value="1">·
  78. <PARAM name="Titlebar" value="0">
  79. <PARAM name="Toolbars" value="1">
  80. </OBJECT>
  81. </form>
  82. </body>
  83. </html>