Jump to content
Sign in to follow this  
abdu

Save a string, in javascript, into Windows text file

Recommended Posts

How do we save a string, in javascript;

var s='a sentence needs to be saved'

 into Windows text file on local HDD/machine

THANKS IN ADVANCE.

Share this post


Link to post
Share on other sites

For security reasons, Javascript is not allowed to write to files.

If Javascript could write to files then websites would use that to install viruses onto your computer.

Share this post


Link to post
Share on other sites

For short sentences or data/text under 5M in size you might consider local storage.

Note:  It does not create a file that can be shared.  Only saves to local client computer, not server.

Edited by JMRKER

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...