为什么宽度的值比高度的要大,明明屏幕是横着放的啊
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<script type="text/javascript">
//方法一:
var w = document.documentElement.clientWidth||document.body.clientWidth;
var x = document.documentElement.clientHeight||document.body.clientHeight;
document.write("宽:"+w+" "+" "+"高:"+x+"<br />");
//方法二:
var H=window.innerHeight;
var W=window.innerWidth;
document.write("宽:"+W+" "+" "+"高:"+H+"<br />");
</script>
</body>
</html>