Subscribe For Free Updates!

We'll not spam mate! We promise.

Apr 7, 2013

Remove special charecter using javascript



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;
                    }
                }

This function replace special charecter when type in text field.

TechniqZone Socializer Widget
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 comments:

Post a Comment