ITeye博客

parent.window.location.href 和 iframe中src的乱码问题

lijackly · 2009-06-15 15:43 · Markdown

parent.window.location.href 和 iframe中src的乱码问题。

要在这两个url地址中传中文,必须加编码,然后再解码。

编码:encodeURI(encodeURI("包含中文的串")) 解码:java.net.URLDecoder.decode("需要解码的串","utf-8");

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。