Home >Web Front-end >JS Tutorial >Solving the problem of special symbols such as , spaces, =, %, &, # etc. in url parameters_javascript skills

Solving the problem of special symbols such as , spaces, =, %, &, # etc. in url parameters_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 17:33:551819browse

When the URL contains special symbols such as , spaces, /, ?, %, #, &, =, etc., the correct parameter values ​​may not be obtained on the server side. What should I do?
Solution
Convert these characters into characters that the server can recognize. The corresponding relationship is as follows:
URL character escape

Replace it with other characters, or use full-width characters.

The medium number in the URL represents a space.                                                                                                                                                                                         
# Represents a bookmark                                        Parameter value =

Statement:
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