<style>
UL Li {
Float:left;
height:50px;
width:120px;
Color:white;
Text-align:center;
margin-left:5px;
List-style-type:none;
}
a{
Color:white;
Text-decoration:none;
}
. menu{
height:50px;
Background: #0094ff;
line-height:50px;
}
. bgcolor {
background:red;
}
</style>
<script>
$ (document). Ready (function () {
$ ('. Menu Li a '). each (function () {
if ($ (this)) [0].href = = String (window.location))
$ (this). Parent (). addclass (' bgcolor ');
});
})
</script>
<div class= "Menu" >
<ul style= "List-style-type:none;" >
<li><a href= "/test/home" title= "Home" class= "Home" > Home </a></li>
<li><a href= "/test/a" title= "Test Navigator" >a test navigation </a></li>
<li><a href= "/test/b" title= "Test Navigator" >b test navigation </a></li>
<li><a href= "/test/c" title= "Test Navigator" >c test navigation </a></li>
</ul>
</div>
Home Navigation Click A to connect to jump and add the upper background color,