Get the query param's value of the current Web URL(location.search).
location.search
Usage:
// http://example.com/?t1=1&t2=2&t3=3&t4=4#2333// ?t1=1&t2=2&t3=3&t4=4const p1 = getQueryParam('t3');const p2 = getQueryParam('t4');console.log(p1, p2); Copy
// http://example.com/?t1=1&t2=2&t3=3&t4=4#2333// ?t1=1&t2=2&t3=3&t4=4const p1 = getQueryParam('t3');const p2 = getQueryParam('t4');console.log(p1, p2);
Output:
3 4 Copy
3 4
Query param.
value
Get the query param's value of the current Web URL(
location.search
).Usage:
Output: