10.07.2017 Views

javascript_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Javascript<br />

Example<br />

Try the following example. It shows how to refresh a page after every 5<br />

seconds. You can change this time as per your requirement.<br />

<br />

<br />

<br />

<br />

<br />

<br />

setTimeout("location.reload(true);", t);<br />

<br />

This page will refresh every 5 seconds.<br />

<br />

<br />

Output<br />

This page will refresh every 5 seconds.<br />

How Page Re-direction Works?<br />

The implementations of Page-Redirection are as follows.<br />

Example 1<br />

It is quite simple to do a page redirect using JavaScript at client side. To redirect<br />

your site visitors to a new page, you just need to add a line in your head section<br />

as follows.<br />

<br />

<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!