Team:HIT-Harbin/js/main.js
From 2014.igem.org
(Difference between revisions)
Line 10: | Line 10: | ||
var arr=document.getElementsByName("rnav"); | var arr=document.getElementsByName("rnav"); | ||
for(var i=0;i<6;i++){ | for(var i=0;i<6;i++){ | ||
- | + | arr[i].style.display = "none"; | |
- | + | } | |
- | arr[i].style.display = "none"; | + | i=x-1; |
- | + | arr[i].style.display = "block"; | |
- | + | ||
- | + | ||
- | + | ||
- | arr[ | + | |
- | + | ||
- | + | ||
} | } |
Revision as of 04:42, 23 July 2014
function displaySubMenu(div) { var subMenu = div.getElementsByTagName("ul")[0]; subMenu.style.display = "block"; } function hideSubMenu(div) { var subMenu = div.getElementsByTagName("ul")[0]; subMenu.style.display = "none"; } function sideMenu(x){ var arr=document.getElementsByName("rnav"); for(var i=0;i<6;i++){
arr[i].style.display = "none";
}
i=x-1; arr[i].style.display = "block";
}