• AddThis Social Bookmark Button

    Add to Technorati Favorites

  • Archives

  • Return the length of a string

    By krates | May 21, 2008

    Sometimes you need to get the length in numbers of a string

    you can easily do it by using javascript

    Syntax:

    <html>
    <body>
    <script type=”text/javascript”>
    var text=”Count me!”;
    document.write(text.length);
    </script>
    </body>
    </html>

    Thanks

    krates

    Share and Enjoy:
    • del.icio.us
    • Technorati
    • Digg
    • StumbleUpon
    • Ma.gnolia
    • Furl
    • Reddit
    • Slashdot
    • Spurl
    • YahooMyWeb

    Topics: Javascript |

    Related Links:

    Comments