js的decodeURI错误,谁能帮帮我? [英] js decodeURI error, who can help me?
本文介绍了js的decodeURI错误,谁能帮帮我?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,我有问题,谁能帮助我.
Hi guys, I have a problem, and who can help me.
js code:
var url=decodeURI("%D0%C2%CE%C5%D0%C5")
//error:decodeURI The URI to be decoded is not a valid encoding
推荐答案
这将引发格式错误的URI序列"异常.我不知道您的意思是什么字符串,但这可能不是encodeURI
创建的.要了解什么是格式正确的序列,请参见:
http://en.wikipedia.org/wiki/Percent-encoding [ http://www.w3schools.com/jsref/jsref_encodeuri.asp [ http://www.w3schools.com/jsref/jsref_decodeuri.asp [
This throws "malformed URI sequence" exception. I don''t know what string do you mean, but it wasn''t probably created byencodeURI
. To know what is well-formed sequence, please see:
http://en.wikipedia.org/wiki/Percent-encoding[^].
Alternatively, type the exact string you need and pass it as a parameter toencodeURI
, to see what should you have on input ofdecodeURI
. Please see:
http://www.w3schools.com/jsref/jsref_encodeuri.asp[^],
http://www.w3schools.com/jsref/jsref_decodeuri.asp[^].
—SA
这篇关于js的decodeURI错误,谁能帮帮我?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文