---
title: "jquery获取window高度  ,  获取的是 文档 的高"
author: "HUS2013"
date: "2015-10-10T10:39:40Z"
tags: []
categories: ["Web前端"]
slug: "jquery-window"
draft: false
lastmod: "2015-10-10T10:42:47Z"
id: 2248017
url: "https://hus2013.iteye.com/blog/2248017"
---

问题现象:

     $(document).height() 、 $(window).height()  二者相等

 

问题原因:

      获取出来的 和document 获取的是一样 可能存在原因是 w3c协议问题 DOCTYPE HTML 1.0 如果用4.0会不正确