Wednesday 16 November 2016

remaining characters counter javascript


remaining characters counter javascript

Introduction:

Here I will explain remaining characters counter javascript or count number of characters in textbox javascript. Some times show the character counter to remaining for textbox or textarea at client side. For this we need to use onkeyup event of textbox or textarea.

In previous post I explained System.Array' does not contain a definition for 'Count' how to access session in class c# how to create chat application in asp.net using c# sql query to get daily count and many article about Asp.net javascript and C#

javascript character count textarea
count number of characters in textbox javascript
textbox character counter jquery
textarea character count jquery
javascript character countdown
validate number of characters in textbox javascript
jquery character countdown
textbox character counter in asp.net c#

Eample:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
<html>
 <head>
    <title>remaining characters counter javascript</title>
    <script type="text/javascript">
  function Counter() {
  var i = document.getElementById("txtMessage").value.length;
  document.getElementById("lblCounter").innerHTML = 10 - i;
    }
     </script>
    </head>
<body>
 <h1> Show Number of Characters Remaining in Textbox or Textarea  </h1>
 example of remaining characters counter javascript
 <br><br>
 Enter Name(max length:10): <input id='txtMessage' type='text' MaxLength="10" onkeyup="Counter()" />
 <lable id='lblCounter'> 10</label>
 <br><br>
</body>
<html>

You might also like

1. file type validation in jquery
2. file size validation in jquery
3. calling web service without adding web reference
4. How to bind CheckBoxList from database
5. How to bind DropdownList from database

No comments:

Post a Comment



Asp.net tutorials