前端

img superdullwolf

ASP做的acdsee

发表于2004/10/3 15:36:00  1190人阅读

我的acdsee,两个文件
acdsee.htm

<html>
<head>
<META name=VI60_defaultClientScript content=VBScript>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>浏览器防acdsee看图程序</title>
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--

Sub Submit_onclick
window.open "acdsee.asp",null,"fullscreen=yes"
window.opener=null
window.close
End Sub

-->
</SCRIPT>
</head>

<body>
浏览器防acdsee看图程序,载入根据图片多少,每500张,需要1分钟或者更长时间,请稍等.....<br>
<input type="button" name="Submit" value="是,我想看">


</body>
</html>

 


acdsee.asp文件


<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
 
    <td  align="left" valign="top" nowrap id=mytd>
      <select id=select1 name=select1>
 <%


Dim FSO,picname,mycount
mycount=0
Set FSO = server.CreateObject("Scripting.FileSystemObject")
'这句换成自己的文件夹路径
DoDir FSO.GetFolder("c:")


Sub DoDir(Folder)
   On Error Resume Next
   Dim File,SubFolder
   For Each File In Folder.Files
      'WScript.StdOut.WriteLine File.Path
     
      if lcase(right(File.Path,4))=".jpg" or  lcase(right(File.Path,4))="jpeg"  then
      mycount=mycount+1
      %>
  <option value="<%=File.Path%>"><%=trim(File.Name)%></option>
  <%
  picname=File.Path
  end if
   Next
   For Each SubFolder in Folder.SubFolders
      DoDir SubFolder
   Next
End Sub
-->
%></select>
      <br>
      <input type="button" name="Submit1" value="上一个" onclick="vbs:prevpic">
      <br>
      <input type="button" name="Submit2" value="下一个" onclick="vbs:nextpic">
      <br>
      <input type="button" name="Submit3" value="随机播放幻灯片" onclick="vbs:showme">
      <br>
      <input type="button" name="Submit32" value="关闭窗口" onClick="vbs:shutdown">
      <br>
      <font color="#FFFFFF">共<%=mycount%>张</font><br> 
    </td>
        
    <td width="100%" align="center" valign="top" ><img src="<%=picname%>" id="mypic" onmouseout="vbs:mytd.style.display='block'" onmouseover="vbs:mytd.style.display='none'"></td>
  </tr>
</table>
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--

dim flag
flag=0

 

Sub select1_onchange
 showpic
End Sub
sub prevpic()
 if select1.selectedIndex=0 then
  select1.selectedIndex=select1.options.length-1
  showpic
 else
  select1.selectedIndex=select1.selectedIndex-1
  showpic
 end if
end sub

sub nextpic()
  if select1.selectedIndex=select1.options.length-1 then
  select1.selectedIndex=0
  showpic
  else
  select1.selectedIndex=select1.selectedIndex+1
  showpic
 end if
end sub

sub slidshow()
 
 if Submit3.value="  停  止  " then
  window.setTimeout "rndpic","3000"
  window.setTimeout "slidshow","3000"  
 end if
end sub
sub showpic()
 dim beisx,beisy,beis
 mypic.src=trim(select1.value)
end sub

sub rndpic()
 dim Mypicid
 randomize
 Mypicid=int(rnd * select1.options.length)
 select1.selectedIndex=Mypicid
 showpic
end sub
sub showme()
flag=flag+1
if flag mod 2 =0 then
 Submit3.value="随机播放幻灯片"
 
 else
 Submit3.value="  停  止  " 
 slidshow
 end if
end sub
sub shutdown()
window.opener=null
window.close
end sub
-->
</SCRIPT>

阅读全文
0 0

相关文章推荐

img
取 消
img