62,046
社区成员
发帖
与我相关
我的任务
分享
<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>
<textarea onkeydown= "if(this.value.lenth> 100){document.getElementById('btnID').enabled=false;}"> </textarea>