Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Get Parameters Of URL As A String


	const url = new URL('https://example.com/?a=hello&b=world');

	const params = new URLSearchParams([
    ...Array.from(url.searchParams.entries())]).toString();


console.log(params);
/*a=hello&b=world*/
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Get #Parameters #Of #URL #As #A #String
ADD COMMENT
Topic
Name
3+9 =