importword.aspx
上传用户:lanchensha
上传日期:2022-02-27
资源大小:7530k
文件大小:3k
源码类别:

编辑器/阅读器

开发平台:

C#

  1. <%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" Inherits="Word_dntb.Importword" %>
  2. <%@ Import Namespace="DotNetTextBox" %>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" >
  5. <head>
  6. <title><%=ResourceManager.GetString("importword")%></title>
  7. <meta http-equiv="pragma" content="no-cache" />
  8. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  9. <base target="_self" />
  10. <style type="text/css">
  11. body,a,table,input,button{font-size:9pt;font-family:Verdana,Arial}
  12. </style>
  13. <script language=javascript>
  14. var userAgent = navigator.userAgent.toLowerCase();
  15. var is_ie = (userAgent.indexOf('msie') != -1);
  16. function loading()
  17. {
  18.     document.getElementById("loading").style.visibility="visible";
  19.     return true;
  20. }
  21. function addeditor()
  22. {
  23. if(confirm('<%=ResourceManager.GetString("importwordconfirm")%>'))
  24. {
  25. if(is_ie)
  26. {
  27. window.returnValue=document.getElementById("worddoc").value;
  28. window.close();
  29. }
  30. else{
  31. window.opener.plugin_execommand(document.getElementById("worddoc").value);
  32. window.close();
  33. }
  34. }
  35. }
  36. </script>
  37. </head>
  38. <body leftmargin=5 topmargin=5>
  39.     <form id="form1" runat="server">
  40.             <div id="loading" style="border-right: #333333 1px dashed; border-top: #333333 1px dashed;
  41.                         font-size: 9pt; visibility: hidden; border-left: #333333 1px dashed;
  42.                         width: 270px; color: #000000; border-bottom: #333333 1px dashed; position: absolute; height: 120px; background-color: #ffffff">
  43.                         <center>
  44.                             <br />
  45.                             <br />
  46.                             <%=ResourceManager.GetString("loading")%></center>
  47.                         <br />
  48.                         <center>
  49.                             <asp:Button ID="canceloading" runat="server" Style="border-top-style: dashed; border-right-style: dashed;
  50.                                 border-left-style: dashed; border-bottom-style: dashed" />&nbsp;</center>
  51.                         <br />
  52.                     </div>
  53.     <div>
  54.         <asp:FileUpload ID="FileUpload1" runat="server" Height="20px" />
  55.         <asp:Button ID="btnUpload" runat="server" OnClientClick="loading()" OnClick="btnUpload_Click" /><br />
  56.         <asp:CheckBox ID="saveword" runat="server" Width="206px" /><br />
  57.         <asp:HiddenField ID="worddoc" runat="server" /></div>
  58.     </form>
  59. </body>
  60. <script language=javascript>
  61. var load=document.getElementById('loading');
  62. resizeLoad();
  63. window.setInterval("resizeLoad()",10);
  64. function resizeLoad()
  65. {
  66. load.style.top = parseInt((document.documentElement.clientHeight-load.offsetHeight)/2+document.documentElement.scrollTop);
  67. load.style.left = parseInt((document.documentElement.clientWidth-load.offsetWidth)/2+document.documentElement.scrollLeft);
  68. }
  69. if(is_ie)
  70. {
  71. document.body.bgColor="ButtonFace";
  72. }
  73. else
  74. {
  75. document.body.bgColor="#E0E0E0";
  76. }
  77. </script>
  78. </html>