Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

How To Creat multiple pages or elements, and switching between them in JavaScript

Share this post!
 Vote this!

Have you ever wanted to create an HTML page with multiple pages or with elements that can be switched with the click of a button? This can be achieved easily with the help of JavaScript.

In my example I will use three DIV elements: Box1, Box2 and Box3. I want Box1 to be displayed by default.

In your head tag I start with creating the CSS for these three elements. To make it easier for you to see, I'll give each DIV element a different border color.   Put this in your HEAD element.    more...

0 comments:

Post a Comment