3
如何使用WScript編寫文本文件我對此非常瞭解,這就是爲什麼我不能提供一些細節。我想寫可以保存在c日誌文件://用戶/用戶/應用程序數據/本地使用WScript.shell編寫文件
我的示例代碼,使用FileSystemObject的
function WriteFile()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var fh = fso.CreateTextFile("d:\\Test.txt", true);
fh.WriteLine("Some text goes here...");
fh.Close();
}
<body onload = "WriteFile();">
</body>
它在d返回:但在本地C :它不會。
[在C硬盤上使用JavaScript創建和寫入文本文件]可能的副本(http://stackoverflow.com/questions/8461331/create-and-write-text-file-on-c-hardrive-using-javascript ) –