I don’t want user to allow pasting of any non Alphanumeric characters on a text box.
function funAlpha()
{
var otxt=document.getElementById('txtName');
var val=otxt.value;
for(i=0;i
{
var code=val.charCodeAt(i);
if(!(code>=65 && code<=91) && !(code >=97 && code<=121) && !(code>=48 && code<=57))
{ otxt.value=""; return ; }
}
}
function funAlpha()
{
var otxt=document.getElementById('txtName');
var val=otxt.value;
for(i=0;i
{
var code=val.charCodeAt(i);
if(!(code>=65 && code<=91) && !(code >=97 && code<=121) && !(code>=48 && code<=57))
{ otxt.value=""; return ; }
}
}