在文本区域中显示行号
我想在文本区域中显示行号,就像在 jQuery 中可以实现的那样:
我在以下位置寻找答案所以,但我找不到我想要的
另外,我从注释中提供的 JSFiddle 尝试的解决方案向我显示了这样的文本区域:
其中第 1234 行是第一行,第二行是 5678
I want to display the line number in a textarea like this is possible in jQuery:
I looked for answers on SO but I can't find what I want
Display current line and column number for a textarea
Limit number of lines in textarea and Display line count using jQuery
Also, the solution I tried from the JSFiddle provided from the comments show me the textarea like this:
which line 1234 is the first line and the second line is 5678
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
下载此处找到的插件: http://alan.blog-city.com/jquerylinedtextarea.htm< /a>
用法:
全功能演示:http://files. aw20.net/jquery-linedtextarea/jquery-linedtextarea.html (web.archive)
Download the plugin found here: http://alan.blog-city.com/jquerylinedtextarea.htm
Usage:
Fully functional demo: http://files.aw20.net/jquery-linedtextarea/jquery-linedtextarea.html (web.archive)