<script>
window.οnscrοll=function(){
var t =document.documentElement.scrollTop||document.body.scrollTop; //变量t就是滚动条滚动时,到顶部的距离
var left =document.getElementById("left");if( t >=100) { //当拖动到距离顶部100px处时,左边导航固定,不随滚动条滚动
left.style.position="fixed"; left.style.top="0";
}else{
left.style.position="absolute"; //恢复正常
left.style.top="100px";
}}
</script>