Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 div 我有表格,有固定的高度和宽度。每次点击都会显示另一个表格。当在页面底部的特定单元格上单击时,我需要自动滚动滚动条,不应增加窗口高度,也不应在页面上创建额外空间。
<div id="panel" style="width: 1354px; height: 565px;"> <div id="body"> <table></table> </div>
提前致谢..
您可以尝试使用此代码进行滚动:
window.scrollTo(0,0);