Home > Back-end >  How in the URL in the string plus the default escape
How in the URL in the string plus the default escape

Time:12-04

 


Code like this, such as my bookName if is proficient in c + +, he will be the default will be a plus sign into space, and then how to default when I bookName appeared in the special characters on the URL links, escape, automatically,

CodePudding user response:

EncodeURIComponent try

CodePudding user response:

reference 1st floor dkwuxiang response:
encodeURIComponent try

Saying this is how to write, I directly behind the link before adding this recognition

CodePudding user response:

The solution
The front end
The first step in the var bookName=encodeURI (encodeURI (" proficient in c + + ")); Overweight
After the end of the
The second String name=URLDecoder. Decode (bookName, "utf-8"); decoding
  • Related