Just like the title.
To add, maybe you don’t understand what I mean, the number of letters and numbers here and the number of Chinese characters are different
扔个三星炸死你2017-07-05 10:46:46
The above is how to write jquery
, js
can be written like this
document.getElementById('textarea id').value.length;
It has been processed, Chinese is counted as 1
characters, and other characters such as English or numbers are counted as 0.5
Please refer to: http://blog.csdn.net/haison_f...
代言2017-07-05 10:46:46
Since the upper right corner shows how many words have been entered during onchange, it is obviously the value of js monitoring onchange that takes the length
Just handle it if it exceeds the length
扔个三星炸死你2017-07-05 10:46:46
Get the value of the text box, and then determine the length of the value.