⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getfiles.asp

📁 一个ASP做的政府网站的全站程序
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<html>
<head>
<title>Get Files</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../yuhuan.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	background-color: #FFFFFF;
}
-->
</style></head>
<script language="JavaScript">
<!--
function addValue(value)
{
	var form = parent.document.photoForm;
	var tempValue = form.photolist.value;		
	var i,j;
		
	if (tempValue.indexOf(value)==-1){	
			form.photolist.value = form.photolist.value + value + "  ";
	}	

	parent.document.images[0].src="../photoes/" + value;

	return;
}

function previewPhoto(str)
{
	parent.document.images[0].src=str;
	return;
}
// -->
</script>
<body >
<%
				  Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
				  path=Server.MapPath("../photoes") & "\"				 
				  Set colFolders = objFSO.GetFolder(path)
				  %>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class=9v  align="center">
  <% dim photolist()
  i=0
  for each colFile in colFolders.Files
	i=i+1
  next
  redim photolist(i)

  i=0
  for each colFile in colFolders.Files
  	photolist(i) = colFile.Name
	i=i+1
  next
  for j=0 to i-1 step 2
  	response.write "<tr>"
	response.write "<td width=15>&nbsp;</td>"
	response.write "<td><a href=javascript:addValue('" & photolist(j) & "') onmouseover=javascript:previewPhoto('../photoes/" & photolist(j) & "') >" & photolist(j) & "</a></td>"
	response.write "<td><a href=javascript:addValue('" & photolist(j+1) & "') onmouseover=javascript:previewPhoto('../photoes/" & photolist(j+1) & "') >" & photolist(j+1) & "</a></td>"
	response.write "</tr>"
  next
  %>  
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -