摘要:
原理:下载文件时设置一个cookie,客户端利用js间隔性检测cookie,如果检测到则服务端对下载的文件处理完毕,然后通知客户端http://johnculviner.com/post/2012/03/22/Ajax-like-feature-rich-file-downloads-with-jQuery-File-Download.aspx下载地址:https://github.com/johnculviner/jquery.fileDownload/blob/master/src/Scripts/jquery.fileDownload.js/** jQuery File Download 阅读全文
摘要:
方式1:<script>var parser = document.createElement('a');parser.href = "http://example.com:3000/pathname/?search=test#hash";parser.protocol; // => "http:"parser.hostname; // => "example.com"parser.port; // => "3000"parser.pathname; // => 阅读全文