我需要知道浏览器窗口中是否出现了垂直滚动条。是否可以使用 jQuery 或任何其他方式?
最佳答案
像这样:
if (document.documentElement.scrollHeight === document.documentElement.clientHeight) {
//There is no vertical scrollbar
}
这在 IE 中不起作用
关于jquery - 如何知道滚动条是否出现在浏览器中(jQuery)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2913375/