WindowLocation

// url = 'http://www.codepad.co/save/?id=1'; console.log(window.location.pathname); // --> /save/ console.log(window.location.origin); // --> http://codepad.co console.log(window.location.search); // --> ?id=1 // ------------- window.location.reload(); // --> reloads the page window.location = 'http://www.google.com'; // --> goes to specified page

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.