當(dāng)表格內(nèi)容超過預(yù)設(shè)的長寬后,自動(dòng)產(chǎn)生滾動(dòng)條,并設(shè)置滾動(dòng)條的位置
如果要在js中控制滾動(dòng)條顯示的位置的話:
document.getElementById("out").scrollTop=document.getElementById("out").scrollHeight;
<style>
#out{
WIDTH:800px;
HEIGHT:300px;
POSITION:relative;
OVERFLOW-X:scroll;
OVERFLOW-Y:scroll;
SCROLLBAR-ARROW-COLOR:#48b4fc;
SCROLLBAR-BASE-COLOR:#D6E9FC;
}
</style>
<div id="out">
<table width="780" height="280">
<tr><td></td></tr>
......
</table>
</div>
#out{
WIDTH:800px;
HEIGHT:300px;
POSITION:relative;
OVERFLOW-X:scroll;
OVERFLOW-Y:scroll;
SCROLLBAR-ARROW-COLOR:#48b4fc;
SCROLLBAR-BASE-COLOR:#D6E9FC;
}
</style>
<div id="out">
<table width="780" height="280">
<tr><td></td></tr>
......
</table>
</div>
posted on 2008-07-15 11:31 月芽兒 閱讀(919) 評論(0) 編輯 收藏 所屬分類: 建站技巧雜侃