日期:2014-05-16  浏览次数:20386 次

求教如何锁定页面滚动条
我想实现这样一个功能:不管滚动条在什么位置,只要点击一下按钮就将其锁定在那个位置上,禁止页面滚动

请问该怎么实现?谢谢!

------解决方案--------------------
参考:
http://www.v-ec.com/dh20156/article.asp?id=10

实例中,拖动滚动条,然后点[show tips page 1]或2,就可以看到你要的效果!
------解决方案--------------------
定位到 <html> 上,document.getElementsTagName( "html ")[0].style.overflow= "hidden "
或者 <html id= "scroll ">
然后调用地方写document.getElementById( "scroll ").style.overflow= "hidden "