Como alterar este javascript apenas para usar apenas um link
Eu tenho javascript: - quando clicamos no link 'home' ele mostra as coisas da casa, então quando clicamos no link 'about' ele mostra as coisas relacionadas. Como fazer isso apenas para ter um botão e esse botão deve ser capaz de alterar links em cliques. Aqui está o código.
<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<br />...";
break;
}
document.getElementById('container').innerHTML = html;
</script>