源代码:
<html> <body> <FONT COLOR=#ff0000><% dim fs,d,n set fs=Server.CreateObject("Scripting.FileSystemObject") set d=fs.GetDrive("c:") n = "The " & d.DriveLetter if d.IsReady=true then n = n & " drive is ready." else n = n & " drive is not ready." end if Response.Write(n) set d=nothing set fs=nothing %></FONT> </body> </html>
运行结果:
<html> <body> <FONT COLOR=#ff0000><% dim fs,d,n set fs=Server.CreateObject("Scripting.FileSystemObject") set d=fs.GetDrive("c:") n = "The " & d.DriveLetter if d.IsReady=true then n = n & " drive is ready." else n = n & " drive is not ready." end if Response.Write(n) set d=nothing set fs=nothing %></FONT> </body> </html>