Forum'da ara:
Ara


« Önceki başlık :: Sonraki başlık »  
Yazar Mesaj
Mesaj14.04.2011, 18:22 (UTC)    
Mesaj konusu: Açılır Menü

Arkadaşlar açılır menü yapmak istiyorum.
Ama Nasıl yapacağımı bilmiyorum.
Bildiğiniz bir program varmı.
DHTML den yaptım ama çıkan dosyaları neyapacağımı bilmiyorum :S .
Mesaj14.04.2011, 19:27 (UTC)    
Mesaj konusu:

sana hazır bir kod vereyim..
Kod:
<!--- KAYNAK: www.berker19.tr.gg --->
<body bgcolor="ebe2d3" marginheight="30" topmargin="10" link="#ffffff" vlink="#ffffff" alink="#ffffff">
<script language="JavaScript">
<!-- Simple Cross Browser NavBar (Not NS6) kurt.grigg( at )virgin.net

MenuTitles=new Array()
SubMenuLinks=new Array()
function Rtrn(c){
if (document.layers) c.bgColor=HighLight;
if (document.all) c.style.background=HighLight;
}
function HghLght(c){
if (document.layers) c.bgColor=MenuBgColor;
if (document.all) c.style.background=MenuBgColor;
}
OpenLayer=(document.layers)?"<br><layer width=100% onMouseOver='HghLght(this)'; onMouseOut='Rtrn(this)'><center>":"<span style='width:100%' onMouseOver='HghLght(this)'; onMouseOut='Rtrn(this)'>";
CloseLayer=(document.layers)?'</center></layer>':'</span>';

/*************** Edit the appearance here ***************/

MenuWidth=(document.layers)?105/*NS width*/:105 /*IE width*/;
MenuFont='Arial';
MenuFontSize=2; //Yazı büyüklüğü, 1 ve 7 arası değerler girilmelidir!
MenuFontColor='#ffffff'; //Başlık Rengi!
MenuBgColor='000066'; //Başlık Zemin Rengi!
HighLight='000099'; //Alt Zemin Rengi!
Separater=1;

/********* Menü Başlıkları *********/

MenuTitles[0]='Menü 1';
MenuTitles[1]='Menü 2';
MenuTitles[2]='Menü 3';
MenuTitles[3]='Menü 4';
MenuTitles[4]='Menü 5';
MenuTitles[5]='Menü 6';



SubMenuLinks[0]=""/****** Menü 1 *******/
+OpenLayer+"<a href='www.berker19.tr.gg'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='www.berker19.tr.gg'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer


SubMenuLinks[1]=""/****** Menü 2 *******/
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer

SubMenuLinks[2]=""/****** Menü 3 *******/
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer

SubMenuLinks[3]=""/****** Menü 4 *******/
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer

SubMenuLinks[4]=""/****** Menü 5 *******/
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer

SubMenuLinks[5]=""/****** Menü 6 *******/
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer
+OpenLayer+"<a href='#'>Link Adı</a>"+CloseLayer


/* Buradan aşağıya dokunulmayacaktır*/


Spacer=MenuWidth+Separater;
IniPos= -MenuWidth-Separater;
aSpacer=MenuWidth+Separater;
aIniPos= -MenuWidth-Separater;
MenuAmount=MenuTitles.length;
if (document.layers){
for (i=0; i < MenuAmount; i++){
document.write("<layer name='submenu"+i+"' top=0 left="+(aIniPos+=aSpacer)+" "
+"height=10 width="+MenuWidth+" bgcolor="+HighLight+" visibility=hide"
+" onMouseOver='this.visibility=\"show\"; var cd=this.id.length-1; var ab=this.id.charAt(cd); H(ab)' "
+" onMouseOut='this.visibility=\"hide\"; var ef=this.id.length-1; var gh=this.id.charAt(ef); B(gh)'>"
+"<center><font face="+MenuFont+" size="+MenuFontSize+" color="+MenuFontColor+">"
+"&nbsp;<br>"+SubMenuLinks[i]+"<br></font></center></layer>");
}
for (i=0; i < MenuAmount; i++){
document.write("<layer name='nsmenu"+i+"' top=0 left="+(IniPos+=Spacer)+" height=0 "
+"width="+MenuWidth+" bgcolor="+MenuBgColor+" "
+"onMouseOver=\"this.bgColor=HighLight; var e=this.id.length-1; var d=this.id.charAt(e); On(d)\" "
+"onMouseOut=\"this.bgColor=MenuBgColor; var e=this.id.length-1; var d=this.id.charAt(e); Off(d)\">"
+"<center><font face="+MenuFont+" size="+MenuFontSize+" color="+MenuFontColor+">"
+MenuTitles[i]+"</font></center></layer>");                                       
}
function On(x){
 for (i=0; i < MenuAmount; i++){
 document.layers['submenu'+x].visibility='show';
 }
}
function Off(x){
 for (i=0; i < MenuAmount; i++){
 document.layers['submenu'+x].visibility='hide';
 }
}
function B(y){
 for (i=0; i < MenuAmount; i++){
 document.layers['nsmenu'+y].bgColor=MenuBgColor;
 }
}
function H(y){
 for (i=0; i < MenuAmount; i++){
 document.layers['nsmenu'+y].bgColor=HighLight;
 }
}
}
if (document.all){
for (i=0; i < MenuAmount; i++){
document.write("<div id='sub"+i+"' style='position:absolute;"
+"top:0px;"
+"left:"+(aIniPos+=aSpacer)+";"
+"height:0px;"
+"width:"+MenuWidth+";"
+"background:"+HighLight+";"
+"visibility:hidden'"
+" onMouseOver='this.style.visibility=\"visible\";"
+" document.all[\"headers"+i+"\"].style.background=HighLight';"
+" onMouseOut='this.style.visibility=\"hidden\";"
+" document.all[\"headers"+i+"\"].style.background=MenuBgColor'>"
+"<center><font face="+MenuFont+" size="+MenuFontSize+" color="+MenuFontColor+">"
+"&nbsp;<br>&nbsp;<br>"+SubMenuLinks[i]+"</font></center></div>");
}
for (i=0; i < MenuAmount; i++){
document.write("<div id='headers"+i+"' style='position:absolute;" 
+"top:0px;"
+"left:"+(IniPos+=Spacer)+";"
+"height:0px;"
+"width:"+MenuWidth+";"
+"background:"+MenuBgColor+";"
+"padding:0px'"
+" onMouseOver='document.all[\"sub"+i+"\"].style.visibility=\"visible\";"
+" this.style.background=HighLight'"
+" onMouseOut='document.all[\"sub"+i+"\"].style.visibility=\"hidden\";"
+" this.style.background=MenuBgColor'>"
+"<center><font face="+MenuFont+" size="+MenuFontSize+" color="+MenuFontColor+">"
+MenuTitles[i]+"</font></center></div>");
}
}
//-->
</script>
<!--- KAYNAK: www.berker19.tr.gg --->

______________
Mesaj14.04.2011, 20:18 (UTC)    
Mesaj konusu:

paylaşım için teşekkürler
Önceki mesajları göster:   


Powered by phpBB © 2001, 2005 phpBB Group
Türkçe Çeviri: phpBB Türkiye & Erdem Çorapçıoğlu