How to create and download an XML file on the fly using javascript?

后端 未结 5 1426
眼角桃花
眼角桃花 2020-12-29 15:12

I got a requirement as following:

There is a link on a web page. As user clicks on link it should create a file on the fly and a download box pops up. How to do it u

5条回答
  •  盖世英雄少女心
    2020-12-29 15:50

    You could create a data-URI. Most modern browsers should be able to understand it. See http://en.wikipedia.org/wiki/Data_URI_scheme

提交回复
热议问题