Answers for "html parameters in url"

7

get parameters from url

var url_string = "http://www.example.com/t.html?a=1&b=3&c=m2-m3-m4-m5"; //window.location.href
var url = new URL(url_string);
var c = url.searchParams.get("c");
console.log(c);
Posted by: Guest on July-09-2020
0

javascript create url with parameters

// URL w/ PARAMETERS
let origin = "https://www.google.com"
let pathname =  "/search"
let query = "?q=javascript%20create%20url%20with%20parameters"

let url = origin + pathname + query

console.log(url);
Posted by: Guest on July-17-2021
1

get parameters from url

www.test.com/t.html?a=1&b=3&c=m2-m3-m4-m5
Posted by: Guest on July-09-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language