Answers for "get url params from url"

41

get parameter from the actual url javascript

// https://testsite.com/users?page=10&pagesize=25&order=asc
const urlParams = new URLSearchParams(window.location.search);
const pageSize = urlParams.get('pageSize');
Posted by: Guest on December-04-2020
1

JS get url params

const params = new URLSearchParams(window.location.search);
const something = decodeURIComponent(params.get('data'));
Posted by: Guest on April-14-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language