用于计数每行字符数的javascript [英] javascript for count number of characters per line

查看:65
本文介绍了用于计数每行字符数的javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有多行文本框.我可以每行输入80个字符,并且有10行.现在,当用户键入内容时,我想显示什么字符数和什么行号?

例如:在第一行中,如果用户输入"Hi Hello",则标签中将显示字符:8/80(仅是短语")

I have multiline textbox. i can enter 80 characters per line and there are 10 lines such. Now when user is typing, i want to display what is the number of character and what is the line number?

For ex : in first line if user enter "Hi Hello" then in label it will display Character : 8/80 (" is just the phrase)

推荐答案

您好外观此处 [学习JQuery [ ^ ]

谢谢.
Hi have a look Here[^].
This is JQuery based solution. try to implement jquery. Learn JQuery[^]

Thanks.


这篇关于用于计数每行字符数的javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆