I have javascript:- when we click on the 'home' link it shows home stuff,then when we click the 'about' link it shows the about related things. How to make this only to have one button and that 1 button should be able to change links on clicks. Here is the code.
<script type="text/javascript">
function show(page)
{
var html = "";
switch(page)
{
case "home": html ='All the stuff of the page ';break;
case "about": html = ='All the stuff of the pahe break;
case "contact": html = "This is the contact page
...";break;
}
document.getElementById('container').… = html;
}
</script>
</head>
<body>
<div id="container">This is the homepage
...</div>
<a href="#" title="Home" onclick="show('home');return false">Home</a>
<a href="#" title="About" onclick="show('about');return false">About</a>
<a href="#" title="Contact" onclick="show('contact');return false">Contact</a>
</body>