Count Character Written in textarea or textbox in javascript

74 views

If you want to count character written in textbox or textarea simply use:

length attribute with elements value.

Demo:


Text Length:

  1. <textarea id="character_write" rows="5" cols="50" onkeyup="getElementById(’character_length’).value=this.value.length"></textarea>
  2. <input type="text" name="character_length" id="character_length">



« How To Take Out Image Name And Format Or Extension From URL OR IMG Tag How To Count Words in javascript? »
Posted on Tuesday, April 28th, 2009 at 3:38 pm under Javascript | RSS 2.0 Feed

Post Comment

You must be logged in to post a comment.



ComputerEducationWorld.com All Rights Reserved © RSS | CBSE | Education Boards Of India | What is My IP?