开发者

Checking ScrollBar of TextBox

I have a simple asp:textbox set up like this

<asp:TextBox runat="server" ID="tbxWarning" TextMode="MultiLine" Rows="4">
</asp:TextBox>

The SUBMIT button on the pag开发者_开发问答e does not become active until you scroll to the bottom of the textbox. This part works except that sometimes the textbox does not have enough data in it to make the textbox scrollable. How can I check (with either javascript or jQuery) wether or not the scrollbar in the textbox is enabled?


The JavaScript .clientHeight property of a textarea (or any other element) tells you how many pixels can be seen. The .scrollHeight property tells how how many pixels can be scrolled. If they are equal, there's no scrollbar.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜