客户端
[JScript]
var fs, a, ForAppending;
ForAppending = 8;
fs = new ActiveXObject("Scripting.FileSystemObject");
a = fs.OpenTextFile("c:\\test.htm");
vt = a.Read(-1);
a.Close();
[VBScript]
Sub OpenTextFileTest
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\test.htm")
vt = f.Read -1
f.Close
End Sub服务器端
OpenTextFile("c:\test.htm")==>OpenTextFile(Server.MapPath("test.htm"))
[JScript]
var fs, a, ForAppending;
ForAppending = 8;
fs = new ActiveXObject("Scripting.FileSystemObject");
a = fs.OpenTextFile("c:\\test.htm");
vt = a.Read(-1);
a.Close();
[VBScript]
Sub OpenTextFileTest
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\test.htm")
vt = f.Read -1
f.Close
End Sub服务器端
OpenTextFile("c:\test.htm")==>OpenTextFile(Server.MapPath("test.htm"))
alert(gua[0].OuterHTML);
alert(tt)
或者
alert(document.documentElement.outerHTML)