Using Client Side ActiveX Technology
If you want to do so for your internal purpose or have full faith on your client you can very well do this using ActiveX scripts.
CreateTextFile() creates a file as specified in the first parameter and returns a TextStream object that actually writes to the specified file. The second parameter here accepts a Boolean value. If its value is true that means the file can be overwritten if it exists.
To write any content to the file WriteLine(“Text to write") method of the TextStream object is used. To make the content permanent the file is closed using Close() method. This way we can write a file to store any text data only.
Here's a sample code snippet - (please remove all the whitespace, when you try to run it!)
< span onClick= " file() " ezonclick="true" >Hello < /span > < /p >
var ForAppending = 8;
var TriStateFalse = 0;
var fso = new ActiveXObject("Scripting.FileSystemObject");
var newFile = fso.OpenTextFile("c:\\WINDOWS\\Desktop\\001122.html",
ForWriting, true, TriStateFalse);
< /SCRIPT >