📌  相关文章
📜  javascript 检测元素是否滚动 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:14.803000             🧑  作者: Mango

代码示例1
var div = document.getElementById('container_div_id');

var hasHorizontalScrollbar = div.scrollWidth > div.clientWidth;
var hasVerticalScrollbar = div.scrollHeight > div.clientHeight;

/* returns true/false */