Download textarea contents as a file using only Javascript (no server-side)

前端 未结 8 2326
挽巷
挽巷 2020-11-29 03:44

I am being asked to make a \"download\" button that downloads the contents of a textarea on the same page as a file, with the browser\'s \"Save As...\" dialog showing up. Co

8条回答
  •  长情又很酷
    2020-11-29 03:59

    There were some javascript libraries that did this kind of thing, via small embedded SWF file. For example this one.

提交回复
热议问题