<html>
<head>
<style type="text/css">
div
{
border:1px solid red;
width:100px;
height:100px;
}
</style>
<script>
function displayResult()
{
document.getElementById("div1").style.overflow="hidden";
}
</script>
</head>
<body>
<div id="div1">
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
</div>
<br>
<input type="button" onclick="displayResult()" value="Hide overflow">
</body>
</html>