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

编辑器/阅读器

开发平台:

C#

  1. <%@ Page Language="C#" AutoEventWireup="true" Inherits="DotNetTextBox.UpLoad" %>
  2. <%@ Import Namespace="DotNetTextBox" %>
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  6. <base target="_self" />
  7. <script language="javascript" type="text/javascript">
  8. var userAgent = navigator.userAgent.toLowerCase();
  9. var is_ie = (userAgent.indexOf('msie') != -1);
  10. var image = new Array;
  11. var w,h;
  12. function changeWaterMark()
  13. {
  14. if(document.getElementById("watermark").checked)
  15. {
  16. document.getElementById("watermarkimginput").disabled=false;
  17. document.getElementById("imgx").disabled=false;
  18. document.getElementById("imgy").disabled=false;
  19. document.getElementById("config_watermarkImages").value="true";
  20. }
  21. else
  22. {
  23. document.getElementById("watermarkimginput").disabled=true;
  24. document.getElementById("imgx").disabled=true;
  25. document.getElementById("imgy").disabled=true;
  26. document.getElementById("config_watermarkImages").value="false";
  27. }
  28. if(document.getElementById("watermarkText").checked)
  29. {
  30. document.getElementById("watermarktextinput").disabled=false;
  31. document.getElementById("textx").disabled=false;
  32. document.getElementById("texty").disabled=false;
  33. document.getElementById("textsize").disabled=false;
  34. document.getElementById("fontcolor").disabled=false;
  35. document.getElementById("fonttype").disabled=false;
  36. document.getElementById("config_watermark").value="true";
  37. }
  38. else
  39. {
  40. document.getElementById("watermarktextinput").disabled=true;
  41. document.getElementById("textx").disabled=true;
  42. document.getElementById("texty").disabled=true;
  43. document.getElementById("textsize").disabled=true;
  44. document.getElementById("fontcolor").disabled=true;
  45. document.getElementById("fonttype").disabled=true;
  46. document.getElementById("config_watermark").value="false";
  47. }
  48. }
  49. function loading(showmessage)
  50. {
  51. document.getElementById("loading").style.visibility="visible";
  52. document.getElementById("statusmessage").innerHTML=showmessage;
  53. return true;
  54. }
  55. function checksize(str,type)
  56. {
  57. if(type=="wedth"&document.getElementById("ImgWidth").value!=""&document.getElementById("ImgHeight").value!="")
  58. {
  59. if(w!=null&&h!=null)
  60. {
  61. document.getElementById("ImgHeight").value=Math.round((parseInt(str)*h)/w);
  62. }
  63. else
  64. {
  65. w=str;
  66. h=document.getElementById("ImgHeight").value;
  67. }
  68. }
  69. else if(document.getElementById("ImgWidth").value!=""&document.getElementById("ImgHeight").value!="")
  70. {
  71. if(w!=null&&h!=null)
  72. {
  73. document.getElementById("ImgWidth").value=Math.round((parseInt(str)*w)/h);
  74. }
  75. else
  76. {
  77. w=document.getElementById("ImgWidth").value;
  78. h=str;
  79. }
  80. }
  81. }
  82. function preview(name)
  83. {
  84. if(is_ie)
  85. {
  86. var path=document.getElementById("path").innerText;
  87. }
  88. else
  89. {
  90. var path=document.getElementById("path").textContent;
  91. }
  92. document.getElementById("file_path").value=path+name;
  93. if(document.getElementById("ImgWidth"))
  94. {
  95. document.getElementById("previewImg").innerHTML='<img src='+document.getElementById("file_path").value.replace(/s/g,"%20")+' align="middle" onload="ImgWidth.value=this.width;ImgHeight.value=this.height;w=this.width;h=this.height;if(this.width>300){this.width=300;this.height=Math.round(this.width*h/w);}if(this.height>225){this.height=225;this.width=Math.round(this.height*w/h);}" />';
  96. }
  97. else
  98. {
  99. document.getElementById("previewImg").innerHTML='<img src='+document.getElementById("file_path").value.replace(/s/g,"%20")+' align="middle" onload="w=this.width;h=this.height;if(this.width>300){this.width=300;this.height=Math.round(this.width*h/w);}if(this.height>225){this.height=225;this.width=Math.round(this.height*w/h);}" />';
  100. }
  101. document.getElementById("file_path").focus();
  102. }
  103. function newImages()
  104. {
  105. if(document.getElementById("file_path").value!="")
  106. {
  107. var arr=new Array;
  108. arr[0]=document.getElementById("file_path").value.replace(/s/g,"%20");
  109. arr[1]=document.getElementById("ImgWidth")?document.getElementById("ImgWidth").value:"";
  110. arr[2]=document.getElementById("ImgHeight")?document.getElementById("ImgHeight").value:"";
  111. arr[3]=document.getElementById("ImgAlt")?document.getElementById("ImgAlt").value:"";
  112. arr[4]=document.getElementById("Imgalign")?document.getElementById("Imgalign").value:"";
  113. arr[5]=document.getElementById("vspace")?document.getElementById("vspace").value:"";
  114. arr[6]=document.getElementById("hspace")?document.getElementById("hspace").value:"";
  115. if(is_ie)
  116. {
  117. window.returnValue = arr;
  118. }
  119. else
  120. {
  121. if(document.getElementById("insertImg").value!='<%=ResourceManager.GetString("mof")%>')
  122. {
  123. window.opener.inserObject(null,'img',arr);
  124. }
  125. else
  126. {
  127. window.opener.inserObject(null,'modimg',arr);
  128. }
  129. }
  130. }
  131. window.close();
  132. }
  133. var sTitle='<%=ResourceManager.GetString("insertimages")%>';
  134. if(is_ie)
  135. {
  136. if (dialogArguments!=null)
  137. sTitle='<%=ResourceManager.GetString("mofimages")%>';
  138. }
  139. else
  140. {
  141. image=window.opener.GetImg();
  142. if(image[0]!=null)
  143. {
  144. sTitle='<%=ResourceManager.GetString("mofimages")%>';
  145. }
  146. window.focus();
  147. }
  148. document.write("<TITLE>" + sTitle + "</TITLE>");
  149. </script>
  150. <link href="stylesheet.css" rel="stylesheet" type="text/css" />
  151. </head>
  152. <body topmargin="0">
  153. <form id="uploadFace" runat="server">
  154. <table border="0" align="center" style="word-break:break-all" width="100%">
  155. <tr>
  156. <td colspan="4" rowspan="1" valign="top" style="width: 840px">
  157. <fieldset><legend><span style="color: gray"><%=ResourceManager.GetString("uploadface")%></span>&nbsp;</legend>
  158. <%=ResourceManager.GetString("uploadpath")%>:<asp:Label ID="path" runat="server" ForeColor="Black"></asp:Label>&nbsp;&nbsp;&nbsp;<asp:ImageButton ID="returndir" OnClick="returndir_Click" ImageUrl="img/parentfolder.gif" runat=server/>..<br />
  159. <%=ResourceManager.GetString("uploadimages")%>:<asp:FileUpload ID="FileUpload1" runat="server" Width="388px" Height="21px" TabIndex="2" Font-Size="10pt" /><asp:Button ID="uploadBtn" runat="server" OnClick="UploadBtn_Click"/><asp:TextBox ID="remoteurl" runat="server" Visible="False" Text="http://" Width="350px"></asp:TextBox>
  160. <asp:Button ID="remoteupload" runat="server" Visible="False" Width="49px" OnClick="remoteupload_Click" /><br />
  161. <%=ResourceManager.GetString("filepath")%>:<asp:TextBox ID="file_path" runat="server" Width="316px" TabIndex="1"></asp:TextBox>
  162. <input language="javascript" onclick="javascript:newImages()" type="button" value='<%=ResourceManager.GetString("insertimage")%>' id="insertImg" /><br />
  163. <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True" RepeatDirection="Horizontal" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
  164. <asp:ListItem Selected=True Value="local" />
  165. <asp:ListItem Value="remote" />
  166. </asp:RadioButtonList>[ <%=ResourceManager.GetString("uploaduse")%>:<asp:label ID="useSpace" ForeColor="Red" runat=server />,<%=ResourceManager.GetString("have")%>:<asp:label ID="space" ForeColor="Red" runat=server /><%=ResourceManager.GetString("singlesize")%>:<asp:Label ID="maxSingleUploadSize" runat="server" ForeColor="Red"></asp:Label>
  167. ]</fieldset>
  168. <fieldset style="text-align: center"><legend><span style="color: gray"><%=ResourceManager.GetString("filelist")%></span>&nbsp;</legend>
  169. <div style="border-right: 1.5pt inset; border-top: 1.5pt inset; vertical-align: middle;
  170. overflow: auto; border-left: 1.5pt inset; width: 100%; border-bottom: 1.5pt inset;
  171. height: 240px; background-color: white">
  172. <asp:GridView runat="server" id="File_List" HeaderStyle-HorizontalAlign=Center AutoGenerateColumns="False" HeaderStyle-BackColor="buttonface" HeaderStyle-ForeColor=windowtext HeaderStyle-Font-Bold="True" Width="100%" BorderWidth="1px" OnRowCancelingEdit="File_List_RowCancelingEdit" OnRowUpdating="File_List_RowUpdating">
  173. <Columns>
  174. <asp:TemplateField>
  175. <HeaderTemplate>
  176. <asp:CheckBox ID="checkall" runat="server" Text=<%#ResourceManager.GetString("selectall")%> AutoPostBack="true" OnCheckedChanged="checkAll" />
  177. </HeaderTemplate>
  178. <ItemTemplate>
  179. <asp:CheckBox ID="check" runat="server" />
  180. </ItemTemplate>
  181. <ItemStyle HorizontalAlign="Center" Width="45px" />
  182. </asp:TemplateField>
  183. <asp:TemplateField>
  184. <EditItemTemplate>
  185. <asp:TextBox ID="editName" Text=<%#DataBinder.Eval(Container.DataItem,"Attributes").ToString().ToLower()=="directory"?DataBinder.Eval(Container.DataItem,"Name"):DataBinder.Eval(Container.DataItem,"Name").ToString().Replace(DataBinder.Eval(Container.DataItem,"Extension").ToString(),string.Empty)%> Width="100px" runat=server></asp:TextBox> <asp:Button ID="editBtn" CommandName="Update" CommandArgument=<%#DataBinder.Eval(Container.DataItem,"Name")%> runat=server Text=<%#ResourceManager.GetString("edit")%> /> <asp:Button ID="Cancel" runat=server Text=<%#ResourceManager.GetString("cancel")%> CommandArgument=<%#DataBinder.Eval(Container.DataItem,"Attributes").ToString().ToLower()%> CommandName="Cancel" />
  186. </EditItemTemplate>
  187. <ItemTemplate>
  188. <img src="img/filetype/<%#DataBinder.Eval(Container.DataItem,"Attributes").ToString().ToLower()=="directory"?"folder":((string)DataBinder.Eval(Container.DataItem,"Extension")).Replace(".","")%>.gif" /><asp:LinkButton ID="ListID" Text=<%#DataBinder.Eval(Container.DataItem,"Name")%> style="cursor:pointer; word-break:break-all" ForeColor="#000000" Font-Underline=false onmouseout="this.style.textDecoration='none'" onmouseover="this.style.textDecoration='underline'" CommandArgument=<%#DataBinder.Eval(Container.DataItem,"Name").ToString()%> OnCommand="SetServerCookie" OnClientClick=<%#DataBinder.Eval(Container.DataItem,"Attributes").ToString().ToLower()!="directory"?DataBinder.Eval(Container.DataItem,"Name","javascript:preview("{0}");return false;"):""%> runat="server"/>
  189. </ItemTemplate>
  190. </asp:TemplateField>
  191. <asp:BoundField DataField="LastWriteTime" ReadOnly="True" HtmlEncode=False DataFormatString="{0:D}" >
  192. <ItemStyle HorizontalAlign="Center" Width="25%" />
  193. </asp:BoundField>
  194. <asp:TemplateField>
  195. <ItemTemplate>
  196. <asp:Label ID="LengthCont" Text=<%#DataBinder.Eval(Container.DataItem,"Attributes").ToString().ToLower()=="directory"?"":DataBinder.Eval(Container.DataItem,"Length","{0:#,### Bytes}")%> runat=server />
  197. </ItemTemplate>
  198. <ItemStyle HorizontalAlign=Center Width="25%" />
  199. </asp:TemplateField>
  200. </Columns>
  201. <HeaderStyle Font-Bold="True" ForeColor="WindowText" BackColor="Control" BorderWidth="1px" HorizontalAlign="Center" />
  202. </asp:GridView></div>
  203. <table width="100%" border="0px"><tr><td valign="baseline" style="height: 23px">
  204. [<%=ResourceManager.GetString("controlmenu")%>]:<asp:ImageButton id="selectAllBtn" runat="server" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" ImageUrl="img/selectall.gif" onclick="selectAllBtn_Click" />&nbsp;
  205. <asp:ImageButton ID="deleteBtn" runat="server" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" ImageUrl="img/delete.gif" OnClick="deleteBtn_Click" />&nbsp;&nbsp;<asp:ImageButton id="editBtn" ImageUrl="img/rename.gif" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" runat="server" onclick="editBtn_Click" />&nbsp;&nbsp;<asp:ImageButton ID="newfolderBtn" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" runat="server" ImageUrl="img/newfolder.gif" OnClick="newfolderBtn_Click" />&nbsp;&nbsp;<asp:ImageButton ID="returndir2" OnClick="returndir_Click" ImageUrl="img/parentfolder.gif" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" runat=server/>&nbsp;&nbsp;<input language="javascript" onmouseup="if(is_ie){showModalDialog('find.aspx',this,'dialogWidth:320px;dialogHeight:130px;status:0;scroll:no');}else{window.find();}"
  206. type=image src="img/search.gif" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" title='<%=ResourceManager.GetString("findfile")%>' />&nbsp;
  207. <input language="javascript" onclick="window.close();" type="image" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" src="img/close.gif" title="<%=ResourceManager.GetString("close")%>" /></td>
  208. <td align="right" style="height: 23px">
  209. <img border=0px src="img/logo_S.png" /></td>
  210. </tr></table>
  211. <fieldset><legend><span style="color: dimgray"><span style="color: gray"><%=ResourceManager.GetString("imagepreview")%></span>&nbsp;</span></legend>
  212. <table height="100%" width="100%">
  213. <tr>
  214. <td colspan="3" rowspan="3">
  215. <div style="border-right: 1.5pt inset; padding-right: 0px; border-top: 1.5pt inset;
  216. padding-left: 0px; padding-bottom: 0px; vertical-align:middle; overflow: auto;
  217. border-left: 1.5pt inset; width: 320px; padding-top: 2px; border-bottom: 1.5pt inset;
  218. height: 235px; background-color: white">
  219. <div id="previewImg" align="center" style="background-color: white">
  220. </div>
  221. </div></td>
  222. <td colspan="1" rowspan="3" Width="180px" valign="top">
  223. <asp:HiddenField ID="config_watermark" runat="server" />
  224. <asp:HiddenField ID="config_watermarkImages" runat="server" />
  225. <asp:HiddenField ID="config_watermakOption" runat="server" />
  226. <asp:HiddenField ID="config_smallImages" runat="server" />
  227. <asp:HiddenField ID="config_smallImagesName" runat="server" />
  228. <asp:HiddenField ID="config_maxAllUploadSize" runat="server" />
  229. <asp:HiddenField ID="config_autoname" runat="server" />
  230. <asp:HiddenField ID="config_allowUpload" runat="server" />
  231. <asp:HiddenField ID="config_fileFilters" runat="server" />
  232. <asp:HiddenField ID="config_maxSingleUploadSize" runat="server" />
  233. <asp:HiddenField ID="config_fileListBox" runat="server" />
  234. <asp:HiddenField ID="config_watermarkImagesName" runat="server" />
  235. <asp:HiddenField ID="config_watermarkName" runat="server" />
  236. <asp:HiddenField ID="config_smallImagesType" runat="server" />
  237. <asp:HiddenField ID="config_smallImagesW" runat="server" />
  238. <asp:HiddenField ID="config_smallImagesH" runat="server" />
  239. <asp:HiddenField ID="config_type" Value="Images" runat="server" />
  240. <asp:Button ID="settingimg" CommandArgument="0" Enabled=false OnClick="settingimg_Click" runat=server />
  241. <asp:Button ID="settingwatermark" CommandArgument="1" OnClick="settingwatermark_Click" runat=server />
  242. <asp:MultiView id="showsetupface" runat="server" ActiveViewIndex="0">
  243. <asp:View ID="imgageattribute" runat="server" >
  244. <div style="width:150px" align="left"><br />
  245. <%=ResourceManager.GetString("width")%>:<input id="ImgWidth" style="width: 97px" onblur="if(document.getElementById('checkimgsize').checked){checksize(this.value,'wedth');}" type="text" maxlength="10" /><br />
  246. <%=ResourceManager.GetString("height")%>:<input id="ImgHeight" style="width: 97px" type="text" onblur="if(document.getElementById('checkimgsize').checked){checksize(this.value,'height');}" maxlength="10" /><br /><input id="checkimgsize" type="checkbox" checked="CHECKED" />&nbsp;
  247.     <%=ResourceManager.GetString("keepratio")%><br />
  248. <%=ResourceManager.GetString("alt")%>:<input id="ImgAlt" style="width: 97px" type="text" maxlength="100" /><br />
  249.     <br />
  250.     <%=ResourceManager.GetString("align")%>:<select id="Imgalign" style="width: 97px">
  251. <option selected="selected" value=""><%=ResourceManager.GetString("default")%></option>
  252. <option value="left"><%=ResourceManager.GetString("left")%></option>
  253. <option value="center"><%=ResourceManager.GetString("center")%></option>
  254. <option value="right"><%=ResourceManager.GetString("right")%></option>
  255. </select><br /><br />
  256. <%=ResourceManager.GetString("vspace")%>:<input id="vspace" style="width: 75px" type="text" maxlength="3" /><br />
  257.     <br />
  258. <%=ResourceManager.GetString("hspace")%>:<input id="hspace" style="width: 75px" type="text" maxlength="3" /></div>
  259. </asp:View>
  260. <asp:View ID="watermarksetup" runat="server">
  261. <div style="width:180px" align="left">
  262. <br />
  263. <input id="watermark" onclick="changeWaterMark()" type="checkbox" /><%=ResourceManager.GetString("watermark")%>
  264.     <br />
  265.     <%=ResourceManager.GetString("watermarkposition")%>:<%=ResourceManager.GetString("positionx")%>:<asp:TextBox runat=server id="imgx" Enabled=false style="width: 40px" maxlength="4" Text="0" />&nbsp;<%=ResourceManager.GetString("positiony")%>:<asp:TextBox runat=server id="imgy" Enabled=false style="width: 40px" maxlength="4" Text="0" /><br />
  266.     <%=ResourceManager.GetString("photoaddress")%>:<asp:TextBox ID="watermarkimginput" Enabled=false runat="server" Width="105px"/><br />
  267.     <br />
  268. <input id="watermarkText" onclick="changeWaterMark()" type="checkbox" /><%=ResourceManager.GetString("watermarkText")%>
  269.     <br />
  270.     <%=ResourceManager.GetString("watermarkposition")%>:<%=ResourceManager.GetString("positionx")%>:<asp:TextBox runat=server id="textx" Enabled=false style="width: 40px" maxlength="4" Text="15" />&nbsp;<%=ResourceManager.GetString("positiony")%>:<asp:TextBox runat=server id="texty" Enabled=false style="width: 40px" maxlength="4"  Text="15" /><br />
  271.     <%=ResourceManager.GetString("inputfont")%>:<asp:TextBox ID="watermarktextinput" Enabled=false runat="server" Width="130px"/><br />
  272.     <%=ResourceManager.GetString("font")%>:<asp:DropDownList ID="fonttype" runat="server" Width="100px"></asp:DropDownList><br />
  273.     <%=ResourceManager.GetString("fontsize")%>:<asp:TextBox ID="textsize" Enabled=false runat="server" Text="12" MaxLength="3" Width="30px"/>&nbsp;&nbsp;<%=ResourceManager.GetString("inputcolor")%>:<asp:TextBox ID="fontcolor" Enabled=false runat="server" Text="#000000" MaxLength="10" Width="60px"/></div>
  274.     <script language=javascript>
  275. if(document.getElementById("config_watermark").value=="true")
  276. {
  277. document.getElementById("watermarkText").checked=true;
  278. document.getElementById("watermarktextinput").disabled=false;
  279. document.getElementById("textx").disabled=false;
  280. document.getElementById("texty").disabled=false;
  281. document.getElementById("textsize").disabled=false;
  282. document.getElementById("fontcolor").disabled=false;
  283. document.getElementById("fonttype").disabled=false;
  284. }
  285. if(document.getElementById("config_watermarkImages").value=="true")
  286. {
  287. document.getElementById("watermark").checked=true;
  288. document.getElementById("watermarkimginput").disabled=false;
  289. document.getElementById("imgx").disabled=false;
  290. document.getElementById("imgy").disabled=false;
  291. }
  292.     </script></asp:View>
  293. </asp:MultiView>
  294. </td>
  295. </tr>
  296. </table>
  297. </fieldset>
  298. </fieldset>
  299. </td>
  300. </tr>
  301. </table>
  302. <div id="loading" style="border-right: #333333 1px dashed; border-top: #333333 1px dashed;
  303. font-size: 9pt;visibility:hidden; border-left: #333333 1px dashed;
  304. width: 270px; color: #000000; border-bottom: #333333 1px dashed; position: absolute; height: 120px; background-color: #ffffff">
  305. <center>
  306. <br />
  307. <br />
  308. <span id="statusmessage"></span>
  309. </center>
  310. <br />
  311. <center>
  312. <asp:Button ID="canceloading" runat="server" Style="border-top-style: dashed; border-right-style: dashed;
  313. border-left-style: dashed; border-bottom-style: dashed" />&nbsp;</center>
  314. <br />
  315. </div>
  316. <script type="text/javascript">
  317. var load=document.getElementById('loading');
  318. window.onload=function(){resizeLoad()};
  319. function resizeLoad()
  320. {
  321. load.style.top = parseInt((document.body.clientHeight-load.offsetHeight)/2+document.body.scrollTop);
  322. load.style.left = parseInt((document.body.clientWidth-load.offsetWidth)/2+document.body.scrollLeft);
  323. }
  324. if(is_ie)
  325. {
  326. document.body.bgColor="ButtonFace";
  327. if (window.dialogArguments&&document.getElementById("settingimg").disabled)
  328. {
  329. image = dialogArguments;
  330. document.getElementById("ImgWidth").value=image[0];
  331. w=image[0];
  332. h=image[1];
  333. document.getElementById("ImgHeight").value=image[1];
  334. document.getElementById("ImgAlt").value=image[2];
  335. document.getElementById("file_path").value=image[3];
  336. document.getElementById("Imgalign").value=image[4];
  337. document.getElementById("vspace").value=image[5]?image[5]:"";
  338. document.getElementById("hspace").value=image[6]?image[6]:"";
  339. document.getElementById("insertImg").value='<%=ResourceManager.GetString("mof")%>';
  340. document.getElementById("previewImg").innerHTML='<img src='+image[3]+' align="middle" onload="w=this.width;h=this.height;if(this.width>300){this.width=300;this.height=Math.round(this.width*h/w);}if(this.height>225){this.height=225;this.width=Math.round(this.height*w/h);}" />';
  341. }
  342. }
  343. else
  344. {
  345. document.body.bgColor="#E0E0E0";
  346. if(image[0]!=null)
  347. {
  348. document.getElementById("ImgWidth").value=image[0];
  349. document.getElementById("ImgHeight").value=image[1];
  350. document.getElementById("ImgAlt").value=image[2];
  351. document.getElementById("file_path").value=image[3];
  352. document.getElementById("Imgalign").value=image[4];
  353. document.getElementById("vspace").value=image[5]!="-1"?image[5]:"";
  354. document.getElementById("hspace").value=image[6]!="-1"?image[6]:"";
  355. document.getElementById("insertImg").value='<%=ResourceManager.GetString("mof")%>';
  356. document.getElementById("previewImg").innerHTML='<img src='+image[3]+' align="middle" onload="w=this.width;h=this.height;if(this.width>300){this.width=300;this.height=Math.round(this.width*h/w);}if(this.height>225){this.height=225;this.width=Math.round(this.height*w/h);}" />';
  357. }
  358. }
  359. </script>
  360. </form>
  361. </body>
  362. </html>