Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How do I redirect to another webpage using javascript

window.location.href; // Returns the href (URL) of the current page
window.location.hostname; // Returns the domain name of the web host
window.location.pathname; // Returns the path and filename of the current page
window.location.protocol; // Returns the web protocol used (http: or https:)
window.location.assign; // Loads a new document
window.location.replace; // RReplace the current location with new one.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #I #redirect #webpage #javascript
ADD COMMENT
Topic
Name
2+3 =