<!DOCTYPE html>
<html lang="en-US">
<head>
<style>
#point{
height:150px;
border:1px solid #000;
}
</style>
</head>
<body>
<div id="point">
Height of this container (div) is 150px;
</div>
<button onclick="myFunction()">Click Me</button>
<script>
function myFunction(){
var x = document.getElementById("point");
x.style.maxHeight="50px";
}
</script>
<p><strong>Note</strong>: Click on the button to set the maximum height of this container (div) to "50px".</p> </body>
</html>