大家好,又见面了,我是你们的朋友全栈君。
在我们要获取文档实际高度时,最好用document.documentElement.scrollHeight。
在我们要获取视口实际高度时,用document.documentElement.clientHeight。
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/163723.html原文链接:https://javaforall.net
document.documentElement.scrollHeight or clientHeight?在我们要获取文档实际高度时,最好用document.documentElement.scrollHeight。在我们要获取视口实际高度时,用document.documentElement.clientHeight。
大家好,又见面了,我是你们的朋友全栈君。
在我们要获取文档实际高度时,最好用document.documentElement.scrollHeight。
在我们要获取视口实际高度时,用document.documentElement.clientHeight。
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/163723.html原文链接:https://javaforall.net