首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > vbScript >

滚动条在最下面,该如何处理

2012-02-25 
滚动条在最下面类似聊天功能我想页面打开时如果这个层有滚动条的话是在最下面的我留言的增多也是总处在最

滚动条在最下面
类似聊天功能

我想页面打开时如果这个层有滚动条的话是在最下面的

我留言的增多也是总处在最下面

谢谢!



[解决办法]

HTML code
<html>    <head>        <title> new document </title><script language="javascript"><!--function func(){    div1.innerHTML += new Date() +'<br>';     document.getElementById('div1').scrollTop = document.getElementById('div1').scrollHeight;    //注意这句    setTimeout('func()', 500);}//--></script>    </head>    <body onload="func()">        <div id="div1" style="width:500px; height:500px; overflow:scroll;"></div>    </body></html>
[解决办法]
不想设时间去掉就行了哇。
[解决办法]
在要打开的网页的最下方写个锚点,
链接这个网页的时候,url后面加#你的锚点
例如:
a.htm:
<body>
<a href="b.htm#zhushaoyue">转向b页面</a>
</body>

b.htm
<body>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<p>....wewewewe...</p><br>
<a name=zhushaoyue><p>....wewewewe...</p><br></a>

热点排行