Team:HIT-Harbin/js/main.js
From 2014.igem.org
(Difference between revisions)
Line 21: | Line 21: | ||
function Set(){ | function Set(){ | ||
- | var y=document.documentElement.scrollTop;; | + | var y=document.documentElement.scrollTop; |
+ | document.getElementById("txt").style.innerHTML="<strong>"+y+"xiangsu</strong>"; | ||
if(y>400){document.getElementById("bottomNav").style.display="block";} | if(y>400){document.getElementById("bottomNav").style.display="block";} | ||
} | } |
Revision as of 07:53, 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"); var y=x-1; for(var i=0;i<6;i++){
if(i==y){ arr[i].style.display = "block";
}
else{ arr[i].style.display = "none";
} } }
function Set(){ var y=document.documentElement.scrollTop; document.getElementById("txt").style.innerHTML=""+y+"xiangsu"; if(y>400){document.getElementById("bottomNav").style.display="block";} } else{document.getElementById("bottomNav").style.display="none";} } window.onscroll=Set;