1

I have little problem. I'm Polish, and i need polish characters on my site.

When i try to set title, there's no problem, i can set polish characters, and everything is displayed well. But when i try to set Value, there's some mess in my address bar. When i try to make:

"Masaże i SPA" i get:

"Masa%C5%BCe%20i%20SPA".

I've searched on google, but there's no specific solution to my problem.

What i'm trying to do, is send URL to HTML, but it encodes it wrong way.

Is there any solution for that?

Thanks for any help.

4

1 回答 1

4

为什么让您感到惊讶的是,设置浏览器地址栏的 URL 值(不是页面标题,请注意)会输出一个(顺便说一下)经过 url 编码的字符串?

如果要设置页面标题,请使用setTitle()而不是setValue().

编辑

请参阅此页面以了解为什么需要对 URL 中的特殊字符进行编码。

于 2011-12-18T14:17:22.527 回答