java - ajax - Why jquery replaces "+" with a space (" ")? -
I am having a problem here when I use Ajax to pass my parameter to a controller with a "+" I am changing it from some place. Example, I value = Please help in advance thanks. something in Also note: JavaScript encodercomponent () function can be used, as answered: Tom + Jerry + Garfield ajax. When I use System.out.println () in my controller, it displays
Tom Jerry Garfield . I tried to use other special characters, I have no problem.
GET and
POST URL is most likely or via form), the blank space is encoded in the form of "+" (plus) symbols before it gets to the server if you have a normal
GET You can see this behavior if you request - you will see something like
google.com?q=test+example if you want to pass through a plus symbol an Ajax GET / POST request, you need to "urlencode" it is the URL encoded value for
+
% 2B .
Comments
Post a Comment