Passing variables through a url

How do you pass variables through a url, so that you can pick it up in Javascript / html? Any help / tutorials / replit examples appreciated.

To pass variables through url use this format:


To read these variables using JavaScript, try something like this:

const variables = {};"&").forEach(function(variable) {
	const temp = variable.split("=");
	variables[temp[0]] = temp[1];
	variablename: "value",
	anothervariable: "anothervalue"

Thank you. That’s super helpful!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.