javascript - The url parameter value has the special symbol "+", how to escape it?
typecho
typecho 2017-07-05 10:44:04
0
4
864

The encodeURI() method is currently used in the project, so the encodeURI() function will not escape the following ASCII punctuation marks that have special meanings in URIs.

When the passed parameter value is "Qu", the server gets "Qu", and what it needs to get is 'Qu'. How to solve this problem?

typecho
typecho

Following the voice in heart.

reply all(4)
过去多啦不再A梦

There are too many people stepping down, so let’s change to the formal method.
encodeURIComponent or base64 can be used.

迷茫

encodeURIComponent

漂亮男人

encodeURI() function will not escape: ;/?:@&=+$,#
but encodeURIComponent can

習慣沉默

Base64 transfer down

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!