如何让html文本区域滚动到结束?
我已经定义了一个像这样的html文本区域:
<TEXTAREA style='width:100%' ROWS=15 readonly='readonly'>
是否有任何参数可以定义我想要在文本区域末尾看到滚动?
我知道我可以提供一个 id 并使用 jquery/javascript 使其滚动到末尾,但不是有更简单的方法吗?
I've defined an html textarea like this:
<TEXTAREA style='width:100%' ROWS=15 readonly='readonly'>
Is there any parameter where I can defined that I want to see the scroll at the end of the textarea?
I know I could provide an id and make it scroll to the end with jquery/javascript but isn't it there a simpler way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果你的意思是文本区域的内部滚动条,没有javascript就不可能。
你的文本区域的合成也很奇怪。你混淆了大写和小写..对属性使用单引号或不使用引号而不是双引号,希望你不会错过结束标签
if you mean the inner scroll bar of the textarea its not possible without javascript.
also the synthax of your textarea is really strange. you mix up upper with lowercase.. use singlequotes or no quotes for attributes instead of doublequotes and hopefully your not missing the closing tag