Use JavaScript to write to text file?

前端 未结 4 2048
失恋的感觉
失恋的感觉 2020-12-21 18:05

I have a need to capture the topics of a search from one of my blog pages and write it to text file for followup. I have been able to capture the input string, however, am n

4条回答
  •  半阙折子戏
    2020-12-21 18:11

    If your're using modern browsers which support data-uri, you can create content with javascript and force a download by base64 encoding it and making it compatible with data-uri, then simply pointing window location at it.

    This answer demonstrates an HTML-only way to do it.

    You can also use a flash helper to take care of this. For instance, Downloadify does this.

提交回复
热议问题