</object>
<textarea id=TxtBody >无标题</textarea>
<br>
<input type=button value=加载 >
<input type=button value=保存 >
<script>
function loadDoc()
{
fileDialog.CancelError=true;
try{
fileDialog.Filter="HTM Files (*.htm)|*.htm|Text Files (*.txt)|*.txt";
fileDialog.ShowOpen();
var fso=new ActiveXObject("Scripting.FileSystemObject");
var reading=1;
var f=fso.OpenTextFile(fileDialog.filename,reading);
//window.confirm(f);
var r=f.ReadAll();
f.close();
TxtBody.value=r;
}catch(e){}
}
function saveDoc()
{
fileDialog.CancelError=true;
try{
fileDialog.Filter="HTM Files (*.htm)|*.htm|Text Files (*.txt)|*.txt";
fileDialog.ShowSave();
var fso=new ActiveXObject("Scripting.FileSystemObject");
var f=fso.CreateTextFile(fileDialog.filename,true);
f.write(TxtBody.value);
f.Close();
}
catch(e){}
}
</script>
</body>