近几天学习VBS遇到的问题很多,我就一贴几个小问吧- option explicit
- dim fso,fl,fl2,var,var1,wshshell
- set fso=createobject("scripting.filesystemobject")
- set fl=fso.createtextfile("c:\1.txt",true)
- response.write "o.no"
- fl.writeline ("www.bathome.net")
- fl.write("qw ,我是")
- fl.close
- set fl2=fso.opentextfile("c:\1.txt",1)
- var1=fl2.readline
- response.write "o.no"
- set wshshell=createobject("wscript.shell")
- wshshell.popup var1,5,"ok",33
复制代码 运行后总是显示response未定义.但是我在学习过程中也未发现定义response
以下是我在学习中看到的代码- Sub CreateFolder
- Dim fso, fldr
- Set fso = CreateObject("Scripting.FileSystemObject")
- Set fldr = fso.CreateFolder("C:\MyTest")
- Response.Write "Created folder: " & fldr.Name
- End Sub
复制代码 经过对比未发现什么不一样的啊,如果能打印,就算没有变量也是一样啊
[ 本帖最后由 wc726842270 于 2010-12-30 04:23 编辑 ] |