I have a registration form which contains a read-only textarea. I want to require any visitor to scroll to the bottom of the textarea, which contains terms and conditions or
Christian Varga's solution is absolutely correct, and can also be applied to a div. However, if you are using a div instead of a textarea, the div MUST NOT have any padding on it or it breaks.
My workaround for this was to place a div inside my styled div (with padding, rounded corners, and a border) to detect scrolling. So:
Lorem ipsum...terms text...
The only possible drawback to this approach is if you add padding to the containing div, the scrollbar appears on the inner div, which may not look good to some users.