如何獲取頁面高度兼容寫法

獲取頁面高度可以通過不同的方法來實現(xiàn),以下是一些兼容不同瀏覽器的寫法: 使用原生JavaScript```javascript// 獲取整個頁面的高度function...
獲取頁面高度可以通過不同的方法來實現(xiàn),以下是一些兼容不同瀏覽器的寫法:
使用原生JavaScript
```javascript
// 獲取整個頁面的高度
function getFullHeight() {
var windowHeight = window.innerHeight document.documentElement.clientHeight document.body.clientHeight;
return windowHeight;
本文由夕逆IT于2025-01-25發(fā)表在夕逆IT,如有疑問,請聯(lián)系我們。
本文鏈接:http:///bian/335717.html
本文鏈接:http:///bian/335717.html