Jak jsem ti psal, je to kosmetická úprava... hlavně mě tu nekamenujte, psal sem to narychlo tak tam třeba není kontrola existence apod.
<script language="JScript">
function WriteFile(filename,text)
{
var fso, f, r
var ForReading = 1, ForWriting = 2;
fso = new ActiveXObject("Scripting.FileSystemObject")
f = fso.OpenTextFile(filename, ForWriting, true)
f.Write(text);
f.Close();
}
function ReadFile(filename)
{
var fso, f;
var ForReading = 1, ForWriting = 2;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.OpenTextFile(filename, ForReading);
return(f.ReadAll());
}
function read()
{
fi = document.getElementById("fle");
el = document.getElementById("ta");
el.innerText = ReadFile(fi.value);
}
function wrt()
{
fi = document.getElementById("fle");
el = document.getElementById("ta");
WriteFile(fi.value,el.innerText);
}
</script>
<input type="file" id="fle"><button onclick="read();">Načíst</button><br>
<textarea id="ta" style="width: 300px; height: 300px"></textarea><br>
<button onclick="wrt();">Uložit</button>