Hii crmpicco!!
Try this
<script language="javascript">
var i
i=0;
function getval(val)
{
if(val==1)
i++
else
i--;
if(i<0)
i=0;
obj=document.getElementById("divid")
obj.style.height=40+i*10
obj.style.width=300
obj.style.overflow='auto';
}
</script>
<div id="divid" style="background:red;height:300px">
hello1 <br>
hello 2<br>
hello 3<br>
hello 4<br>
hello 5<br>
hello 6 <br>
hello 7<br>
hello 8<br>
hello 9<br>
hello 10<br>
</div>
<input type=button onclick="getval(1)" value=Increase>
<input type=button onclick="getval(2)" value=Decrease>
Hope this will help you
Cheers :)
vinod
|