I've created a textarea, and counting its characters, when it reaches multiple of 160 increment the message count, and on moving the cursor it will show the character position and the message number properly. but on selecting the content it will display the message count as 0 and 0 remaining character , how to solve this, i'm trying to set the values as last character on selecting the content.
Here is the working example of what I've tried : http://jsfiddle.net/F6CZs/1/
Any guidance and help is appreciated..! Here is the actual values :
Here comes the change of values on selecting the content :
我知道这不是“ keyup”,应该只是
$(id).bind("keydown click", function () {
Try this.
Not sure what you were trying to achieve with the, "# Message(s)" part of the counter.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.