To test for alphanumeric characters only
JavaScript
//To test for alphanumeric characters only:
if (/^[0-9A-Za-z]+$/.test(@@))
{
alert("hi")
//there are only alphanumeric characters
}
else
{
//it contains other characters
}
//To test for alphanumeric characters only:
if (/^[0-9A-Za-z]+$/.test(@@))
{
alert("hi")
//there are only alphanumeric characters
}
else
{
//it contains other characters
}