String length : String : Data Type JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Data Type » String »

 

String length



    
<html>
<body>
<p id="myP">How many characters in this sample text?</p>
<button onclick="function1();">Click me to find out</button>
<script language="JavaScript">
function function1() {
    var m = "How many characters in this sample text?".length;
    alert(m)

</script>
</body>
</html>

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Data Type
» String