Thursday 23 February 2012

.Net Beginners : How to get the length of the string using javascript?

There is one method "length" to get length of string.

Syntax:
string.length

Example:
<script type="text/javascript">

     var txt="Computer";
     alert(txt.length);

</script>

No comments:

Post a Comment