收集整理 时间是: 02/06/06 下午 01:17:43.
文件名称: jsmthSkipLine.htm
页面标题: SkipLine 方法  •  文件大小: 2201  •  最后更新: Mon, 06 Feb 2006 02:23:48 GMT

SkipLine 方法

在读取TextStream 文件时跳过下一行。

object.SkipLine( )

object 总是一个 TextStream 对象的名称。

说明

下面的示例演示了SkipLine 方法的用法:

function SkipLineDemo()
{
   var fso, f, r
   var ForReading = 1, ForWriting = 2;
   fso = new ActiveXObject("Scripting.FileSystemObject")
   f = fso.OpenTextFile("c:\\testfile.txt", ForWriting, true)
   f.WriteLine("Hello world!");
   f.WriteLine("JScript is fun");
   f.Close();
   f = fso.OpenTextFile("c:\\testfile.txt", ForReading);
   f.SkipLine();
   r = f.ReadLine();
   return(r);
}

请参阅

Read 方法 | ReadAll 方法 | ReadLine 方法 | Skip 方法应用于: TextStream 对象