waitfor.asp

来自「集合了学习asp的100个实例」· ASP 代码 · 共 30 行

ASP
30
字号
<%

  Response.Buffer = true

%>



<html>

<head><title>WaitFor组件示例</title></head>

<body>

<h2>WaitFor组件示例</h2>

<blockquote>

<%

  Set WaitObj = Server.CreateObject ("WaitFor.Comp")

  Response.Write "现在开始等待: " & Time & "<br>"

  Response.Flush

  WaitObj.WaitForSeconds 5

  Response.Write "等待完成: " & Time

  Response.Flush

  strFilename = "c:\test.txt"

  Response.Write "<p>现在等待文件 " & strFilename

  Response.Flush

  WaitObj.TimeOut = 45

  if WaitObj.WaitForFileExists (strFileName) then

    Response.Write "<p>在超时时间内找到了文件"

  else

    Response.Write "<p>在超时时间内未找到文件"

  end if

  Response.Flush

%>

</body>

</html>

⌨️ 快捷键说明

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