滚动条在最下面

zhushaoyue 2009-08-28 08:10:50
类似聊天功能

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

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

谢谢!

...全文
35 点赞 收藏 5
写回复
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
toury 2009-09-02
在要打开的网页的最下方写个锚点,
链接这个网页的时候,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>
回复
凡夫与俗子 2009-09-02
不想设时间去掉就行了哇。
回复
zhushaoyue 2009-09-02
谢谢各位
回复
zhushaoyue 2009-09-01
为什么要设时间呢?
回复
andrewsway 2009-08-28

<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>

回复
发动态
发帖子
vbScript
创建于2007-09-28

3997

社区成员

它是一种微软环境下的轻量级的解释型语言,它使用COM组件、WMI、WSH、ADSI访问系统中的元素,对系统进行管理。
申请成为版主
社区公告
暂无公告