我想让浏览器滚动div的id
<div id="test">
lol
</div> 所以我使用下面的代码
window.location = "#test";但是我的url现在是这样的。
http://locahost/index.html#test有没有可能删除"#test“但转到它?
发布于 2013-07-05 12:53:22
滚动到元素:
document.querySelector('#test').scrollIntoView();https://stackoverflow.com/questions/17481265
复制相似问题