Hello, in this JavaScript video, I am going to demonstrate page redirect. So what we can do is redirect to a different page, it could be a redirection on our own website, go to another page or to a totally different website. So what I'm going to do is simply create the h1 when a call is to go along, we click this, it will redirect us to actually not only directly to my company, page and so on this event, nothing new. Feel free to check out the events video. I'm gonna call this pre here Okay, so In here, it's really simple to redirect the window, the location. So it's basically saying this window, change the location of the page.
And it's important the quotation marks. And in between here, you put your company website, HTTP, colon, forward slash wwe.so. No. Key. So correctly, there we go refresh on click, this is reader directed, and it's redirected to a different web page. And that's it.
That's how you redirect is window dot location equals, and then the actual page you want to redirect to it could be just on your own website, or it could be somewhere else. So if I were to do something like Hello, dot html reload. As you can see, file this try to get Hello dot html Obviously that doesn't exist. But that's how you would redirect to a nova. local file, whether that's local on your computer or on a server. But if you want to go to a totally different website, you do it in the conventional, you know, https or http colon four slash four slash, www dot, our website name, and then the TLD as well.
So that's it. Thanks for watching. If you have any questions, feel free to pop me in method and I look forward to seeing you in the next video.