<script>
function abc(iid){
for(var i=1;i<=3;i++){
var divx = document.getElementById("div"+i);
divx.style.display="none";
}
var x = document.getElementById("div"+iid);
x.style.display="";
}
</script>
<a href="javascript:abc(1);">1</a>
<a href="javascript:abc(2);">2</a>
<a href="javascript:abc(3);">3</a>
<br>
<div id="div1" style="display:none">
aaaaaaaaaaaaaaaaaaaaaaaa
</div>
<div id="div2" style="display:none">
bbbbbbbbbbbbbbbbbbbbbbbb
</div>
<div id="div3" style="display:none">
cccccccccccccccccccccccc
</div>