Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

parse data from url javascript

//   https://www.example.com?name=n1&name=n2
let params = new URLSearchParams(location.search);
params.get('name') //    => "n1"
params.getAll('name') //    => ["n1", "n2"]
// SOURCE : https://stackoverflow.com/questions/814613/how-to-read-get-data-from-a-url-using-javascript
// REPLY : Franklin Yu
 
PREVIOUS NEXT
Tagged: #parse #data #url #javascript
ADD COMMENT
Topic
Name
3+2 =