Java script Function emailkey()
Function emailkey()
This Function is used to veryfy whether user enter the correct Emial ID or not using keypress event.
For exaample
< input type=text name=txt_phno onkeypres="num_phone();" >
function emailkey()
{
// nummeric with hybhen and blankspace
if (event.keyCode>47 && event.keyCode <58) //
{
return true;
}
if (event.keyCode==46) // Dot.....
{
return true;
}
if (event.keyCode==95) // _.....(underscore)
{
return true;
}
if (event.keyCode==64) // @@.....
{
return true;
}
if (event.keyCode>96 && event.keyCode <123)//smal
{
return true;
}
if (event.keyCode>64 && event.keyCode <91) file://cabs
{
return true;
}
event.keyCode=0;
return false;
}
<< Home