今天在逛csdn论坛时,看到这个有意思的问题,随手记了下来。
<Textarea id="t"></Textarea>
<input onclick="chk()" type=button value="测试">
<script>
function chk()
{
a = document.getElementById("t").scrollTop + document.getElementById("t").offsetHeight
b = document.getElementById("t").scrollHeight
isBottom = a>=b
alert(isBottom)
}
</script>