Answers for "javascript url pas array"

0

javascript url pas array

myArray = ['aaa', 'bbb', 'ccc'];
var arrStr = encodeURIComponent(JSON.stringify(myArray));
$('#myLink').attr({ href: '/myLink?array=' + arrStr });
Posted by: Guest on May-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language