Home > Web Front-end > JS Tutorial > When passing parameters on a js page, the parameter value contains special characters_javascript skills

When passing parameters on a js page, the parameter value contains special characters_javascript skills

WBOY
Release: 2016-05-16 18:39:20
Original
955 people have browsed it

A small problem encountered at work. In one page, window.showModel("comm/morelanguage.jsp?str=zh_CN:爱#;zh_TW:爱;en:love;",,,,); pops up another page and Pass the parameters to another page, and there will be a problem when the other page accepts the src parameter value. The value is wrong. I tested it because of the problem of # special characters. The method I adopted for these special characters is to pass

When parameters are used, str=escape('str=zh_CN:爱#;zh_TW:爱;en:love;') handles

When receiving parameters, after getting str, str=unescape(str);

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template