How to save textbox data to file using javascript
I have a web page containing a textbox. This textbox shows result of processing. There is a button "Save Re开发者_如何学Gosult" to save contents of textbox to file. I know it can be easily done with FileStream. But I want the same functionality to save file using Javascript so that there is no need for server postback.
Do anybody have solution to this?
Thanks for sharing your time.
As Darin said JavaScript works on the client's side. As far as I know you won't be able to create files on the user computer using javascript.
A little google-ing mentioned it being posible with JScript/ActiveX/IE (Never tried it).But I would suggest a different approach. Good luck!
You can save it to the client's file system using html5's local storage, however it will only be available to that website.
精彩评论