<script>
function writeData()
{
try
{
//alert(counterValue);
var dataFileObj = fsObj.createtextfile(DataFile, true);
dataFileObj.WriteLine(status);
dataFileObj.Close();
return(true);
}
catch (err)
{
return(false);
}
}
function init()
{
try
{
this.fsObj = new ActiveXObject('Scripting.FileSystemObject');
}
catch (err) {
msg="";
for(var i in err)msg=i+":"+err[i];
alert(msg);
}
if (this.fsObj != null)
{
if (!writeData())alert('写数据时候有错误发生');
}
}
</script>