0

hai! i am trying to check a character with another character which are in the same text box.
when we are entering date,date in the first text box and month in another text box and year in another text box.
now i want when i am trying to enter '0'in the character position when there is '0' at first character position it must raise an alert box as well as when i am trying to enter a digit greater than '1' at 2nd character position it must raise an alert box when there is '3' in the first character position.
plz solve my problem if anyone as early as possible it must be urgent to me

4
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by phoochaliaw
0

Hi
You can use javascript charAt() method to check the character in textbox.Some thing like this

var str = "any thing";
for(var i = 0;i < str.length;i++){
    if(str.charAt(i) == ' '){
          // Do some action
    }
}

Hope this helps

Thanks

0

thank u sir!!!!

Hi
You can use javascript charAt() method to check the character in textbox.Some thing like this

var str = "any thing";
for(var i = 0;i < str.length;i++){
    if(str.charAt(i) == ' '){
          // Do some action
    }
}

Hope this helps

Thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.