Go Around The Tech Corner…

JS Tip 5: How to Redirect Pages using JavaScript

Posted on: December 5, 2009

You can use JavaScript code to redirect user to a page you want. For instance, when a user tries points his/her address bar to http://mywebsite.com, you can have that page automatically redirected to http://www.mywebsite.com using only one line of JavaScript code!

All you need to do is to paste the following code in the <head> section of your html page:

<script language=”JavaScript”>

This function can also be used to redirect users to appropriate versions of web pages depending on which browser they are using. It’s a very simple and handy script, easy to remember and easy to use. Do comment on any other ways of redirecting a user to another page that you may know of!

–          Millie

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Me – The author of this blog!

This is my tech blog. I got another blog, full of jokes that will crack u up! http://humoraddict.blogspot.com

Follow milliepatel84 on Twitter

Tweet Tweet…!!!!

  • You can’t drink all day if u don’t start in the morning 2 days ago
  • I just watched a dog chase his tail for 10 minutes and thought, “wow, dogs are easily entertained.” Then I remembe… twitter.com/i/web/status/9… 2 days ago
  • Just sprayed a mosquito with mosquito repellant. Now it will never have any friends. 3 days ago

Blog Stats

  • 44,400 hits

Top Clicks

  • None

Flickr Photos

%d bloggers like this: