how can i scroll to specific line in a webforms TexetBox using c#

This question already has an answer here:

  • Dynamically Scrolling a Textarea 4 answers
  • jQuery scroll to element 24 answers

  • Have you tried using scrollTop?

    eg

    function scrollTextBox()
    {
        var textBox = document.getElementById("<%= TextBox1.ClientID %>");
        textBox.scrollTop = 30;
    }
    

    You'll need to calculate the scrollTop value though using the line number.

    链接地址: http://www.djcxy.com/p/23102.html

    上一篇: 如何使用jQuery删除所有CSS类?

    下一篇: 我如何滚动到webforms texetBox使用c中的特定行#