I want to define the input key up in English, Thai and a space character. Other characters will be deleted.
$("#username").keyup(function () {
if (this.value.match(/d/g)){
this.value = this.value.replace(/d+/g,'');
}
else {
}
});
- Keyup: %'^%'& (delete)
- Keyup : Jack Boo (ok)
- Keyup : คน Boo (ok)
- Keyup : คน%^+ (delete)
- Keyup : คน452 (delete)
Help :))