Javascript | Tutorials

David Carr

Javascript Redirect

This tutorial will show you how to redirect your page with JavaScript.

first you need to tell the browser your using JavaScript by using

<script type="text/javascript">

Which tells the browser your using text with javascript you then use the window property and location to specify an address to use

window.location = "http://www.dcblog.dev";

Then close the JavaScript.

</script>

Here's the full script:

<script type="text/javascript">
window.location = "http://www.dcblog.dev";
</script>

 

Domains are often purchased from multiple providers, keeping track of where a domain is and its DNS settings can be tricky. Domain Mapper solves this by listing all your domains in one place. View your DNS settings and receive reminders to renew your domains. Try it today.

Support my work by donating with PayPal.

Subscribe to my newsletter

Subscribe and get my books and product announcements.

© 2009 - 2021 DC Blog. All code MIT license. All rights reserved.