var a=http://10.1.1.11:8000/Picture/1/ABC_08_11_2016_%CD%AC%C0%EF_qsy4.jpg
decodeURI(a)或者decodeURIComponent(a)都抱如下错误:
Uncaught URIError: URI malformed
这是什么意思,如何解决,编码是utf-8
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
var a = 'http://10.1.1.11:8000/Picture...'
字符串 引号 引起来
这个URI是不合法的,让后台改改吧
ABC_08_11_2016_%CD%AC%C0%EF_qsy4 utf-8无法解码,格式不匹配
使用站长工具的
UrlEncode编码/解码 功能, 选择gb2312编码,可以把你这个 URL 解码为http://10.1.1.11:8000/Picture/1/ABC_08_11_2016_同里_qsy4.jpg,具体如下图。无法解码.
附:
decodeURIComponent() 函数可对 encodeURIComponent() 函数编码的 URI 进行解码。
我试了试,先进行编码,再解码。你看看OK吗。