Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to send array in query string in javascript

myArray = ['1', '2', '3'];
var arrStr = encodeURIComponent(JSON.stringify(myArray));
window.location = url + '/?id='+id + '&type=' + myArray;
 
PREVIOUS NEXT
Tagged: #send #array #query #string #javascript
ADD COMMENT
Topic
Name
7+6 =