📄 18.4.1 gettempname方法.html
字号:
<script>
var ofso = new ActiveXObject("Scripting.FileSystemObject");
var tempfd=ofso.GetSpecialFolder(2);
temp=ofso.GetTempName();
var tempf=tempfd.CreateTextFile(temp);
tempf.WriteLine("这是一个测试");
tempf.Close();
var tempf=ofso.GetFile(ofso.BuildPath(tempfd,temp));
with (document)
{
write("临时文件路径:<br>"+tempf.Path)
write("<br>大小为:"+tempf.Size+"字节")
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -