ASP WriteBlankLines 方法

WriteBlankLines 方法向 TextStream 檔寫入指定數目的新行字元。
語法
TextStreamObject.WriteBlankLines(numlines)
參數 | 描述 |
---|---|
numlines | 必需的。要寫入檔的新行字元的數目。 |
實例
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateTextFile("c:\test.txt",true)
f.WriteLine("Hello World!")
f.WriteBlankLines(2)
f.WriteLine("How are you today?")
f.close
set f=nothing
set fs=nothing
%>
在執行上面的代碼後,檔 test.txt 如下所示:
Hello World!
How are you today?
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateTextFile("c:\test.txt",true)
f.WriteLine("Hello World!")
f.WriteBlankLines(2)
f.WriteLine("How are you today?")
f.close
set f=nothing
set fs=nothing
%>
在執行上面的代碼後,檔 test.txt 如下所示:
Hello World!
How are you today?
