//get the current url
const url = window.location.href;
//get the query string
const queryString = window.location.search;
//get the query string parameters
const params = new URLSearchParams(queryString);
//get the value of a specific parameter
const id = params.get('id');
//output
console.log(url); //http://localhost:3000/index.html?id=1
console.log(queryString); //?id=1
console.log(params); //URLSearchParams { 'id' => '1' }
console.log(id); //1
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)