C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...








The string Object



This article explains about JavaScript 'String 'object







<html>

<head>

<script>

function f()

{
v =document.getElementById('txt');

alert(v.value.length);

}


</script>

</head>

<body>

Enter Text and click on button to get lengh:<BR>

<input type ="text" id ="txt">

<input type ="button" value ="Click" onclick ="return f();" >

</body>

</HTML>



The output is self explanatory. It takes the input string and calculates the lengh.

The main purpose of length validation in real time is used in following cases.

  • To check length of password field, minimum as 7 characters maximum 25
  • To check Userid length id the length is not in the specified range and fire validation message
  • To force user to enter in textboxes when it's a mandatory field or any other fields length checking






    Next Chapter: The Date Object


    Previous Chapter: The JavaScript String object


    Tutorial Index




  • Read TATA Nano reviews.
    dotNet Slackers   BizTalk Adaptors    Web Design   Scripts
    Are you waiting for engineering entrance result? Watch here for engineering entrance results.
    doors in nj

    Contact Us    Privacy Policy    Terms Of Use