如何让菜单移动

来源:百度知道 编辑:UC知道 时间:2024/07/04 11:32:29
在html中,如何让我的左导航菜单跟着页面移动,下拉页面的时候导航也跟着移动,导航始终显示在电脑上面随时供用户点击,求代码谢谢。

<script language="javascript">
<!--
function stat(){
var a = pageYOffset+window.innerHeight-document.bar.document.height+80
document.bar.top = a
setTimeout('stat()',2)
}
function fix(){
nome=navigator.appName
if(nome=='Netscape'){
stat()
}
else{
var a=document.body.scrollTop+document.body.clientHeight-document.all.bar.offsetHeight-80
bar.style.top = a
}}
//-->
</script>