www.subjay.ru

I do chess on js, a log is displayed on the right, and a vertical scroll bar appears, here's how to make it always below, atoms have to constantly drag it down?

2 answers 2

So:

document.forms.FF.b.scrollTop = document.forms.FF.b.scrollHeight; 

Shl is it obfuscator in your work or you write? (I understand your code)

  • odd fails ( - Ruslan Sabanov
  • @ Ruslan Sabanov, the code is not yours, clearly. Modify the function Df so: function Df (x) {d.FF.b.value + = '\ n' + x; d.FF.b.scrollTop = d.FF.b.scrollHeight; } - Yura Ivanov
 var maxScrollTop = $('textarea').prop('scrollHeight'); var innerHeight = $('textarea').innerHeight(); $('textarea').scrollTop(maxScrollTop - innerHeight); 

And put it all on an event when a new entry appears in the textarea, well, or something like that. Understand yourself. The answer to this question is easily found in Google, by the way. In English.