Removing %20 in get method?
var c=new Array(a);
(eg: a={"1","2"}) window.location="my_details.html?"+ c + "_";
and in my_details.html :
var q=window.location.search;
alert("qqqqqqqqqqqqq " + q);
var arrayList = (q)? q.substring(1).split("_"):[];
var list=new Array(arrayList);
alert("dataaaaaaaaaaaa " + list + "llll " );
and in "list" its dusplaying me "1%202"
;
How can I remove this %20 =space
value ??
Thanks
just use this:
alert("dataaaaaaaaaaaa " + decodeURIComponent(list) + "llll " );
This should decode the %20
to space
look here: http://www.w3schools.com/jsref/jsref_decodeURIComponent.asp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With