ナビゲーションバーの更新背景色の変更


<script type="text/javascript">
getUrlParameters(name){
    var reg=new RegExp("(^|&)"+name+"=([^&]*)(&|$)","i");
    var r=window.location.search.substr(1).match(reg);
    if(r!=null)return unescape(r[2]);
    return null
}
$(document).ready(function(){
    var targetIndex=parseInt(getUrlParameters("viewid"));
    $(".menu ul li").eq(targetIndex).addClass("focus");
});
</script>
<div class="menu">
<div class="head">    </div>
<div class="body">
<ul>
        <li><a href="about.html?viewid=0" class="i">  </a></li>
        <li><a href="honor.html?viewid=1" class="i">  </a></li>
        <li><a href="history.html?viewid=2" class="i">   </a></li>
        <li><a href="contact.html?viewid=3" class="i">    </a></li>
        <li><a href="job.html?viewid=4" class="i">    </a></li>
</ul>
</div>
</div>