Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

redirect javascript

// similar behavior as an HTTP redirect
window.location.replace("http://stackoverflow.com");

// similar behavior as clicking on a link
window.location.href = "http://stackoverflow.com";
Comment

redirect with javascript

window.location.replace('http://mywebsite.com/home.html');
Comment

redirect javascript

// removes the link from the history, 
// e.g. if you would click the arrow back in any browser
// user wouldn't return to that site
window.location.replace("http://stackoverflow.com");

// similar behavior as clicking on a link
// user will return to that site if pressing arrow back
window.location.href = "http://stackoverflow.com";
Comment

javascript redirect to file

window.location.href = '../'; //one level up
// or
window.location.href = '/path'; //relative to domain
Comment

PREVIOUS NEXT
Code Example
Javascript :: push object into array javascript 
Javascript :: how to include a toasted property in vue 
Javascript :: add new array at the back of react state 
Javascript :: how to add a key in a react element 
Javascript :: js queryselectorall 
Javascript :: check if refresh token expired redirect 
Javascript :: Material-ui Accessibility icon 
Javascript :: socket io add timeout 
Javascript :: how to print hello world in javascript 
Javascript :: array.map 
Javascript :: call by value and call by reference in javascript 
Javascript :: formula regex para validar cpf e cnpj no google forms 
Javascript :: use the whatwg url api instead 
Javascript :: appendchild element once if element present in js 
Javascript :: create and get all the files in a directory with nodejs 
Javascript :: scrollview pull to refresh react native 
Javascript :: filepond remove uploaded file 
Javascript :: create new project angular 
Javascript :: javascript split text after x characters 
Javascript :: joi.validate is not a function stack overflow 
Javascript :: Backbone Router 
Javascript :: React S3 Bucket 
Javascript :: javascript string objects 
Javascript :: conditional operator 
Javascript :: remove elements from map javascript 
Javascript :: form in react 
Javascript :: Append to the text in the <p tag 
Javascript :: how to give args type in nestjs graphql for array of input 
Javascript :: google script get sheet size 
Javascript :: angular mouseenter 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =