如何让html文本区域滚动到结束?

发布于 2025-01-04 04:56:00 字数 218 浏览 3 评论 0原文

我已经定义了一个像这样的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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别靠近我心 2025-01-11 04:56:00

如果你的意思是文本区域的内部滚动条,没有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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文