URI编码 将中文或者链接地址进行utf-8编码

document.write(encodeURI("http://www.w3school.com.cn/My first/")+ "<br />")
document.write(decodeURI(decodeURI(decodeURI(decodeURI(encodeURI(encodeURI(encodeURI("http://www.w3school.com.cn/My first/"))))))))

 

plus.downloader.createDownload();封装了完整的下载,不能下载file download发出的流文件

可以下载完整的url网络资源,但是网络资源必须进行encodeURI()

var url = request_url + '/assets/courseware/' + encodeURI(fileName);

 

posted @ 2017-12-14 15:58  音为  阅读(1771)  评论(0编辑  收藏  举报