ReadLine 方法
时间:2007-12-27 来源:不详 作者:林子
从TextStream 文件中读取一整行(一直到换行符,但不包括换行符),并返回由此得到的字符串。 本文来自织梦
object.ReadLine( )
织梦好,好织梦
object 参数总是 TextStream 对象的名称。
dedecms.com
说明
下面的示例演示了Line 属性的用法:
copyright dedecms
function GetLine() {
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);
r = f.ReadLine();
return(r);
}内容来自dedecms
请参阅
Read 方法 | ReadAll 方法 | Skip 方法 | SkipLine 方法应用于: TextStream 对象 copyright dedecms

上一篇:ReadAll 方法 下一篇:Read 方法
文章评论
共有位Admini5网友发表了评论 查看完整内容