Wednesday, June 11, 2008

How to get String Length in JavaScript

Getting String Length in JavaScript is pretty easy.
look at the following code:

var str_length = document.form1.textbox_name1.value;

alert(str_length.length); // get length


first store the text box value into a variable. then simply using the .length method you can get the string length.


Get custom programming done at GetAFreelancer.com!

No comments:

Post a Comment