<script>
    var table = {
        length: 60,
        width: 40,
        height: 120,
        getArea : function () {
            var area= this.length * this.width;
            var volume = this.length* this.width*this.height
            document.write("面积:"+area);
            document.write(\'<br>\'+"体积:"+volume);
            return area;
        }
    }
    table.getArea();
</script>

  

 

版权声明:本文为max-hou原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/max-hou/p/8777923.html