I need serialize a string to a standard URL-encoded notation
my string has some blank spaces and parentheses:
string = "( 3.141516, 3.1415), 3,1415";
and I need get it at serverside as a only value – var, how can I do that in order to sent it as a query string???
Thanks in advance.
Without any jQuery at all:
encodeURIComponent().With jQuery, assuming you’re using something like
$.get():and jQuery will automagically do the URL-encoding for you.