目录

clientHeight()

功能

获取或设置指定的元素客户端框的高度。

语法

geom.clientWidth(elm,value)

参数

范例

Example: 计算 div 的可视区域总高度,b 显示结果。

<!DOCTYPE html>
<html>

<head>
    <style>
    div {height: 100px;width:100px;margin: 100px;padding: 100px; border: 2px solid red;}
    </style>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.3/require.min.js"></script>
    <script>
    require.config({
        baseUrl: "./",
        packages: [{
            name: "skylark",
            location: "../../../src/skylark"
        }, ]
    });
    </script>
</head>

<body>
    rect clientHeight : <b></b>
    <div></div>
    <script>
    require(["skylark/finder", "skylark/geom", "skylark/datax"], function(finder, geom, datax) {
        datax.text(finder.find("b"), geom.clientHeight(finder.find("div")));
    });
    </script>
</body>

</html>