?
本文檔使用 php中文網(wǎng)手冊(cè) 發(fā)布
JScript? | 語(yǔ)言參考 |
在讀取 TextStream 文件時(shí)跳過(guò)指定個(gè)數(shù)的字符。
object.Skip(characters)
object
必選項(xiàng)??偸悄硞€(gè) TextStream 對(duì)象的名稱。
characters
必選項(xiàng)。在讀取文件時(shí)要跳過(guò)的字符個(gè)數(shù)。
被跳過(guò)的字符即被放棄。
下面的示例演示了Skip 方法的用法:
function SkipDemo() {
???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.Skip(6);
???r = f.ReadLine();
???return(r);
}
Close 方法 | Read 方法 | ReadAll 方法 | ReadLine 方法 | SkipLine 方法 | Write 方法 | WriteLine 方法 | WriteBlankLines 方法應(yīng)用于: TextStream 對(duì)象