var theValue = document.all("text1").value;
var fso = new  ActiveXObject("Scripting.FileSystemObject");   
var a = fso.CreateTextFile("c:\\Downloads\\myjstest.txt",true); 
a.WriteLine(theValue);  
a.Close();