Javascript – textarea – characters counter

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<html>
<head>
<script language="javascript">
 <!-- // The counter includes the white spaces -> my mother = 9 letters
  function Counter() {
     var counter = document.myform.count.value.length;
         alert(counter);
  }
 //-->
</script>
</head>
 
<body>
The counter includes the white spaces -> my mother = 9 letters
<form name="myform">
   <textarea name="count" rows="5" cols="30"></textarea><br>
   <input type="button" value="Letter Count" onClick="Counter()">
</form>
</body>
 
</html>

My official WebSite >