A grandi linee:
codice:
<html>
<head>
<script>
onload = function(){
var URL = self.location
if(URL.href.indexOf("mario")!=-1){
document.getElementsByTagName("li")[0].className='menu_select'
}else if(URL.href.indexOf("valerio")!=-1){
document.getElementsByTagName("li")[1].className='menu_select'
}else if(URL.href.indexOf("flavio")!=-1){
document.getElementsByTagName("li")[2].className='menu_select'
}
}
</script>
<style type="text/css">
.menu {
color: #0000CC;
background-color: #99FF00;
display: block;
height: 20px;
width: 120px;
}
.menu_select {
color: #990000;
background-color: #999900;
display: block;
height: 20px;
width: 120px;
}
</style>
</head>
<body>
<li class="menu">mario
<li class="menu">valerio
<li class="menu">flavio
</body>
</html>