Jojoxx.net logotyp

 

 

Användare ikonAnvändare
Besökare just nu: 110
Snabblänkar ikonSnabblänkar
JavaScript-arkivet
Perl
FAQ

Sök på Jojoxx.net


Länkmeny 5

Exempel

Kod


<style type="text/css">
.menuA { font-size: 12px; font-family:Arial; color:black; width: 120px; background-color: rgb(200,220,255); padding:4px; }
.menuA_normal { padding:3px; }
.menuA_active { padding:2px; background-color: white; border:"solid gray 1px"; cursor:pointer; }
.menuA_disabled {  }
</style>
<script type="text/javascript">
var menu=[
	{ text:"Google", url:"http://www.google.com", target:"_blank" },
	{ text:"Yahoo", url:"http://www.yahoo.com/", target:"_blank" },
	{ text:"-", disabled:true },
	{ text:"jojoxx.net", url:"http://www.jojoxx.net" },
	{ text:"Some old site", url:"http://www.domain.com", disabled:true },
	{ text:"webForum", url:"http://www.webforum.nu" }
]

var menuf={
	desc:function(i){ window.status=(i!=null)?menu[i].url:""; return true; },
	selected:null,
	mclick:function(obj,n){
		if(menuf.selected&&menuf.selected!=obj){ menuf.selected.className="menuA_normal"; }
		menuf.selected=obj;
		window.open(menu[n].url,(menu[n].target)?menu[n].target:"_self");
	}
}
wr("<div class=\"menuA\">");
for(var n in menu){
	if(menu[n].disabled){
		wr("<div class=\"menuA_disabled\" disabled=\"disabled\">");
	} else {
		wr("<div class=\"menuA_normal\" onclick=\"menuf.mclick(this,"+n+")\" onmouseover=\"if(menuf.selected!=this){ this.className='menuA_active' }; menuf.desc("+n+");\" onmouseout=\"if(menuf.selected!=this){ this.className='menuA_normal' }; menuf.desc();\">");
	}
	wr(menu[n].text=="-"?"<hr>":menu[n].text); wr("</div>");
}
wr("</div>");

function wr(str){ document.write(str); }
</script>

,