用FSO可以实现,或者可以用ADO的Stream对象

解决方案 »

  1.   

    filename="c:\test.txt"
    Dim fs, f
    Set fs = CreateObject("Scripting.FileSystemObject")
      if fs.FileExists (filename) then fs.DeleteFile (filename)
      set f = fs.OpenTextFile (filename,2,true )
      f.WriteLine "你要写的字"
      f.close
      

  2.   

    把上面那段写在 test.asp 里<SCRIPT LANGUAGE=vbscript>
    sub btn()
      url="test.asp"
       window.showModalDialog url ,window,"dialogHeight:50px;dialogWidth:400px;dialogLeft:100px;dialogTop:100px;"
    end sub</SCRIPT>