This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 只支持chrome | |
| **/ | |
| function downloadFile (type, filename, filecon) { | |
| filename = prompt('填写保存的名字', filename); | |
| var blob = new Blob([filecon], { type: type }); | |
| var url = window.webkitURL.createObjectURL(blob); | |
| var a = document.createElement("a"); | |
| a.download = filename; | |
| a.href = url; |
OlderNewer