Javascript - Html kodları

Aşağıdaki kodları <body> kodundan sonra istediğiniz bir yere yapıştırın.

{codecitation class="brush: xml; gutter: false;" width="500px"}

<!--- KAYNAK: http://www.uzmanweb.net --->
<head>
<style>.level1
{
font-size:12px;
margin:5px 0px 0px 0px;
}
.level1 a
{
font-family:verdana;
color:#9b4e00;
font:bold;
text-decoration:none;
}
.level2
{
font-size:11px;
margin:3px 0px 0px 10px;
}
.level2 a
{
font-family:verdana;
color:#aa5500;
text-decoration:none;
}
.level3
{
font-family:verdana;
margin:3px 0px 0px 20px;
}
.level3 a
{
font-size:10px;
color:#f07800;
text-decoration:none;
}
.level3 a:hover
{
text-decoration:underline;
}</style>
<link rel="stylesheet"></head>
<body bgcolor="FFFFFF">
<script language="JavaScript">var l1 = new Image()
l1.src = "icons/l1.gif" // http://www.uzmanweb.net
var l2 = new Image()
l2.src = "icons/l2.gif"
var l3 = new Image()
l3.src = "icons/l3.gif"

var Link=[
[1,1,"BAŞLIK 1",null,"_blank"],
[2,3,"Link 1","http://www.uzmanweb.net","_blank"],
[2,3,"Link 2","http://www.uzmanweb.net","_blank"],
[2,3,"Link 3","http://www.uzmanweb.net","_blank"],
[1,1,"BAŞLIK 2",null,"_blank"],
[2,2,"Alt Başlık",null,"_blank"],
[3,3,"Link 1","http://www.uzmanweb.net","_blank"],
[3,3,"Link 2","http://www.uzmanweb.net","_blank"],
[2,3,"Link ","http://www.uzmanweb.net","_blank"],
[1,1,"BAŞLIK 3",null,"_blank"],
[2,2,"Alt Başlık",null,"_blank"],
[3,3,"Link 1","http://www.uzmanweb.net","_blank"],
[3,3,"Link 2","http://www.uzmanweb.net","_blank"],
[2,2,"Alt Başlık",null,"_blank"],
[3,3,"Link 1","http://www.uzmanweb.net","_blank"],
[3,3,"Link 2","http://www.uzmanweb.net","_blank"],
[1,1,"BAŞLIK 4",null,"_blank"],
[2,3,"Link 1","http://www.uzmanweb.net","_blank"],
[2,3,"Link 2","http://www.uzmanweb.net","_blank"],
[2,3,"Link 3","http://www.uzmanweb.net","_blank"],
[1,1,"BAŞLIK 5",null,"_blank"],
[2,3,"Link 1","http://www.uzmanweb.net","_blank"],
[2,3,"Link 2","http://www.uzmanweb.net","_blank"],
[2,2,"Alt Başlık",null,"_blank"],
[3,3,"Link 1","http://www.uzmanweb.net","_blank"],
[3,3,"Link 2","http://www.uzmanweb.net","_blank"],
[1,3,"BAŞLIK 6","http://www.uzmanweb.net","_blank"],
[1,3,"BAŞLIK 7","http://www.uzmanweb.net","_blank"]
];

var Prop=[
15,
15,
15,
];</script>
<script language="JavaScript">
function create_menu(id,arr,parr)
{
document.write("<table><tr><td><div style='position:relative;'>");
vtop = 0;
open_div = 0
c_div = 1;
for(i=0;i<arr.length;i++)
{
if(arr[i-1])
{
if(arr[i][0] < arr[i-1][0]) {document.write("</div>");open_div--;}
if((open_div != 0) && (arr[i][0] == 1)) {document.write("</div>");open_div--;
if((open_div == 1) && (arr[i][0] ==1)) document.write("</div>");
}
}
height = parr[(arr[i][1]-1)];
if(arr[i][1] == 1) img = l1.src;
else{if (arr[i][1] == 2) img = l2.src;
else img = l3.src;}
document.write("<div style='top:"+vtop+";height:"+height+"' class='level"+arr[i][0]+"'>")
document.write("<img src="/+img+" border=0 hspace=3 vspace=1 ");
if(arr[i+1]) {if(arr[i][0] < arr[i+1][0]) document.write("onclick=change('"+ id +"_"+ c_div+"') style='cursor:hand'");}
document.write("><a href=\"");
if(arr[i][3] == null) document.write("JavaScript:change('"+ id +"_"+ c_div+"')\"");
else document.write(arr[i][3] +"\" target='"+arr[i][4]+"'");
document.write(">"+arr[i][2]+"</a></div>");
vtop += height;
if(arr[i+1])
{
if(arr[i][0] < arr[i+1][0]) {document.write("<div style='display:none;' id='"+id+"_"+c_div+"'>");open_div++;c_div++;}
}}
for(i=0;i<open_div;i++) document.write("</div></td></tr></table>");

document.write("</div>");
}
function change(id)
{
obj = document.getElementById(id);
if(obj.style.display == "")
{
obj.style.display = "none";
}
else
{
obj.style.display = "";
}
}</script>


<script language="JavaScript">
create_menu('uzmanweb',Link,Prop);
</script>
<!--- KAYNAK: http://www.uzmanweb.net --->

{/codecitation}

Menü resimlerini indirmek için tıklayın >>


Örnek demo için tıklayın >>