Örnek konu: http://www.sukutforum.com/the-vampire-d ... 11297.html
Ve kod:
Kod: Tümünü seç
<script>
window.onload = function(){
var td = document.getElementById('tab');
var liler = td.getElementsByTagName('li');
for(i=0;i<liler.length;i++) {
liler[i].onclick = function() {
for(j=0;j<liler.length;j++) {
if(this === liler[j]) {
var a=j+1;
var read=document.getElementById('box'+a).innerHTML;
document.getElementById('contentbottom').innerHTML=read;
}
}
}
}
}
</script>
<style>
#tab { list-style: none; padding: 0; margin: 0; width:auto; height: 25px; display:block; }
#tab li { height:25px; width: auto; float: left; padding: 0; margin:0; }
#tab li a { height: 25px; width:auto; display:block; padding:0 5px; font:normal 11px/25px Verdana, Geneva, sans-serif; color: #000; border: #000 1px solid; text-decoration:none; }
#tab li a:hover { background: #999 none; }
#tab li.selected a { background: #999 none; }
#box div { display: none; width: 450px; height:260px; border: #000 1px solid; margin-top:1px;}
</style>
<ul id="tab">
<li><a href="#">{TEXT}</a></li>
<li><a href="#">{TEXT2}</a></li>
</ul>
<div id="box">
<div id="box1">
{TEXT1}
</div>
<div id="box2">
{TEXT3}
</div>
</div>
<div id="contentbottom">
<div>
{TEXT1}
</div>
</div>