新建一个下载function
1 | function download(filename, text) { |
调用download(“hello.txt”,”This is the content of my file :)”);即可
下载属性指定当用户单击超链接时将下载目标。只有在设置href属性时才使用此属性。
1 | function download(filename, text) { |
调用download(“hello.txt”,”This is the content of my file :)”);即可
下载属性指定当用户单击超链接时将下载目标。只有在设置href属性时才使用此属性。