📄 browsewebimage.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BrowseWebImage.aspx.cs" Inherits="WebPage_BrowseWebImage" %>
<!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 runat="server">
<title>无标题页</title>
<SCRIPT language="javascript">
var sImagesPath ="../upfiles/ProductionImage/" ;
//var sImagesPath = "C:\\Inetpub\\wwwroot\\RichCompany\\upfiles\\ProductionImage\\" ;
//var sImagesPath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')+1);
var sActiveImage = "" ;
var ImgUrl="";
function getImage(imageName)
{
ImgUrl=sImagesPath+imageName;
alert(ImgUrl);
sActiveImage = ImgUrl;
imgPreview.src = sActiveImage ;
}
function ok()
{
window.setImage(ImgUrl) ;
window.close() ;
}
</SCRIPT>
</HEAD>
<BODY>
<TABLE height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
<TR>
<TD height="100%">
<TABLE height="100%" cellSpacing="5" cellPadding="0" width="100%" border="0">
<TR>
<TD align="center" width="50%" height="80%">
<div class="ImagePreviewArea">
<%
if(!this.IsPostBack)
{
try
{
int intPage = 0;
string strPath = (HttpContext.Current.Request.PhysicalApplicationPath + "\\upfiles\\ProductionImage\\");
string strTemp = "";
string[] strJpg = System.IO.Directory.GetFiles(strPath,"*.jpg");
string[] strGif = System.IO.Directory.GetFiles(strPath,"*.gif");
string[] strBmp = System.IO.Directory.GetFiles(strPath,"*.bmp");
int intFileCount = strJpg.Length + strGif.Length + strBmp.Length;
string[] strFiles = new string[intFileCount];
strJpg.CopyTo(strFiles,0);
strGif.CopyTo(strFiles,strJpg.Length);
strBmp.CopyTo(strFiles,strJpg.Length + strGif.Length);
Response.Write("<table>");
int i = 0;
for( i = 0 ; i < intFileCount ;i++)
{
strTemp = strFiles[i].Substring(strFiles[i].LastIndexOf("\\")+1,strFiles[i].Length - strFiles[i].LastIndexOf("\\") -1);
Response.Write("<tr><td><A href=\"javascript:getImage('"+strTemp+"');\">" + strTemp + "</A></td></tR>");
}
}
catch(Exception ep)
{
Response.Write("<tr><td>"+ep.Message+"</td></tr>");
}
Response.Write("</table border=1>");
}
%>
</div>
<FONT face="宋体"></FONT>
</TD> <!--<td> Select the image to load<BR> <BR> <A href="javascript:getImage('nature');">Nature</A><BR> <A href="javascript:getImage('money');">Money</A><BR> <A href="javascript:getImage('pen');">Pen</A><BR> <A href="javascript:getImage('spanner');">Spanner</A><BR> <A href="javascript:getImage('techcable');">Tech Cable</A><BR> <A href="javascript:getImage('techpcb');">Tech PCB</A> </TD> -->
<TD align="center" width="50%">
<div class="ImagePreviewArea"><IMG id="imgPreview" src="../../../upfiles/spacer.gif">
</div>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD vAlign="bottom" align="center"><INPUT style="WIDTH: 80px" onclick="javascript:ok();" type="button" value="OK">
<INPUT style="WIDTH: 80px" onclick="window.close();" type="button" value="Cancel"><BR>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -