remove special charecter using javascript:
<input type="text" onkeyup="checkspl(this)";>
/*--- this code in script place ---*/
function checkspl(as)
{
var dd=as.value;
if(/^[a-zA-Z0-9- ,]*$/.test(dd) == false)
{
dd=dd.substring(0,(dd.length-1));
as.value = dd;
}
}
0 comments:
Post a Comment