var str;
str=document.frmSelect.txtCode.value;
if((str.indexOf("*") == -1)||(str.indexOf("@") == -1))
{
alert(invalid character;
}
I want to valide that characters like @#$%^& should not be allowed when i dont use || validation goes fine but if i use || opeartor all value get accepted. am i not using the operator properly
str=document.frmSelect.txtCode.value;
if((str.indexOf("*") == -1)||(str.indexOf("@") == -1))
{
alert(invalid character;
}
I want to valide that characters like @#$%^& should not be allowed when i dont use || validation goes fine but if i use || opeartor all value get accepted. am i not using the operator properly
Comment