Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Added: Jan 22, 2018 11:25 PM
Views: 16
Tags: array conver url
  1. function ArrayToURL(array) {
  2.   var pairs = [];
  3.   for (var key in array)
  4.     if (array.hasOwnProperty(key))
  5.  
  6.       pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(array[key]));
  7.   return pairs.join('&');
  8. }