var url=location.href.toLowerCase(); if(url.indexOf("about")!=-1||url.indexOf("honor")!=-1) { document.getElementById("nav2").className="active dropdown"; } else if(url.indexOf("equipment")!=-1) { document.getElementById("nav3").className="active dropdown"; } else if(url.indexOf("product")!=-1) { document.getElementById("nav4").className="active dropdown"; } else if(url.indexOf("case")!=-1) { document.getElementById("nav5").className="active dropdown"; } else if(url.indexOf("news")!=-1) { document.getElementById("nav6").className="active dropdown"; } else if(url.indexOf("contact")!=-1) { document.getElementById("nav7").className="active dropdown"; } else{ document.getElementById("nav1").className="active"; }