开发者

How to save textbox data to file using javascript

开发者 https://www.devze.com 2023-03-04 03:17 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消