javascript for multiple email id's separated by ","

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RamananKalirajan
    Contributor
    • Mar 2008
    • 608

    #16
    Originally posted by pradeepjain
    ok .....so u mean to say 2 email ids seperated by a " , " is best for validation and security rite....can u please tell me how to check weather a " , " is there in string or not so that i can use the logic...

    Consider your string is input. just use the following code

    [HTML] if(input.indexO f(",")<0)
    {your logic; }[/HTML]

    This condition will return -1 if it doesn't finds any comma over there in your string. Use this logic.

    Regards
    Ramanan Kalirajan

    Comment

    Working...