Horje
js get url variables Code Example
js get url parameter
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const code = urlParams.get('code')
js get url variables
const postID = (new URLSearchParams(window.location.search)).get('post');
how to get variable from url in javascript
var getParams = function (url) {
	var params = {};
	var parser = document.createElement('a');
	parser.href = url;
	var query = parser.search.substring(1);
	var vars = query.split('&');
	for (var i = 0; i < vars.length; i++) {
		var pair = vars[i].split('=');
		params[pair[0]] = decodeURIComponent(pair[1]);
	}
	return params;
};
set get variable in url
examplepage.php?var1=value&var2=value




Javascript

Related
get combinations of two js Code Example get combinations of two js Code Example
Factorialize a Number (Tail Call Optimization) Code Example Factorialize a Number (Tail Call Optimization) Code Example
bootstrap pop modal from another modal Code Example bootstrap pop modal from another modal Code Example
get only numbers from string Code Example get only numbers from string Code Example
jquery on scroll Code Example jquery on scroll Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7