The following small series will bring you a perfect solution for the automatic change of the plus sign and & amp; sign in js transmission parameters. I think this is quite good. Now I will share it with you and give you a reference. Let's take a look at the following small series to bring you a perfect solution for the js Transmission Parameters plus the number and the automatic change of the number. I think this is quite good. Now I will share it with you and give you a reference. Let's take a look at it with xiaobian.
Use the get method in the action to obtain the parameter. If the parameter contains "+", it must be processed. Otherwise, it will become a space in the background.
Solution:
1. Use the post method instead;
2. Use url = encodeURI (XXX) in js and decode it again in the background;
3. Replace the escape directly when passing parameters or directly write the escaped code.
Data = "a + B ";
Data = data. replace (/\ +/g, "+ ");
Data = data. replace (/\ &/g ,"&");
Or:
Data = "a + B ";
Data = "a & B ";
The above is the perfect solution provided by the mini-editor for everyone. All the content of the methods for automatically changing the numbers and numbers in js transmission parameters is now available ~
For more information about how to perfectly solve the problem of automatically changing the ampersands and ampersands in js parameters, refer to PHP!