Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js get location search parameter

// Example URL: "https://codepen.io/pen/?editors=0012&debug=true"
const params = new URLSearchParams( location.search ); // Get the ?editors=12 part

let editors = params.get("editors");  // Parse the parameters
console.log( editors ); // === "0012"
console.log( params.get("debug") ); // === "true"
Comment

PREVIOUS NEXT
Code Example
Javascript :: remove tr having delete icon inside jquery 
Javascript :: copy text to clipboard jquery 
Javascript :: emmet react self closing tags 
Javascript :: js inner text 
Javascript :: Ckeditor get content html 
Javascript :: condition in string interpolation angular 
Javascript :: readfilesync 
Javascript :: javascript keep only letters in string 
Javascript :: javascript enumerate 
Javascript :: Node Sass version 6.0.0 is incompatible with ^4.0.0 || ^5.0.0 
Javascript :: expo android built is huge 
Javascript :: casperjs exit 
Javascript :: javascript get boundary client rect 
Javascript :: how to sort array alphabetically in javascript 
Javascript :: react native network request failed fetch 
Javascript :: js wait 5 second 
Javascript :: store object in local storage javascript 
Javascript :: toggle jquery remove others 
Javascript :: map object es6 
Javascript :: change icon sapui5 
Javascript :: js sort by array key value 
Javascript :: update node mac 
Javascript :: how to add event listener to iframe 
Javascript :: js greater than or equal to 
Javascript :: first non repeating character javascript 
Javascript :: referencing an array value in object key js 
Javascript :: scroll to bottom react 
Javascript :: form serialize to json 
Javascript :: generate random otp in node js 
Javascript :: delete attribute javascript 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =