Technical Site
Spiritual Site
Heart Beat Powered by ASP.net

Reading and Writin Files in JavaScript

The Following example shows how to read or write files in local file system using JavaScript. In this example a text file is created on loadng of page and then it is read back.

<html><head> 

      <SCRIPT LANGUAGE='JavaScript'> 
      var password='theirpassword'; 
      var name='username'; 

      function WriteToFile() { 
           var filename = 'g://JSFile.txt'; 
           var fso = new ActiveXObject('Scripting.FileSystemObject'); 
           if (fso.FileExists(filename)) { 
                var a, ForAppending, file; 
                ForAppending = 8; 
                file = fso.OpenTextFile(filename, ForAppending, false); 
                file.WriteLine(name); 
                file.WriteLine(password); 
                } 
           else { 
                var file = fso.CreateTextFile(filename, true); 
                file.WriteLine(password); 
                file.WriteLine(name); 
                } 
           file.Close(); 
           } 

      function ReadIt() { 
           var filename = 'g://HTML Tricks//JSFile.txt'
           if (confirm('Do you want to see what we put on your computer?')) { 
                var fso, a, ForReading; 
                ForReading = 1; 
                fso = new ActiveXObject('Scripting.FileSystemObject'); 
                file = fso.OpenTextFile(filename, ForReading, false); 
                var name = file.readline(); 
                var password = file.readline(); 
                file.Close(); 
                document.write(name + '<br>'); 
                document.write(password); 
           } 
      } 
      </SCRIPT> 
      </head> 
<body onload='WriteToFile();ReadIt()'>
</body> 
</html> 

比如女性在生长发育的期间,就可能遇到很多形形色色的朋友粉嫩公主丰胸,有好的,也有不好的。女性这个时候要学会辨别。比如有些小年轻很早就出入社会丰胸方法,有些可能染上一身都戒不掉毒瘾等都有可能,轻的可能有抽烟喝酒的习惯丰胸酒酿蛋。这些对女性还稚嫩的身体来说来的太早,太快了。有可能太过承重了,女性身体就不能承受之重丰胸产品。
Bookmark
del.icio.us digg Spurl.net Wists Simpy Newsvine BlinkList Furl reddit FARK BlogMarks Yahoo! My Web smarking Ma.gnolia Segnalo
Share