Yes, I couldn't. As for the two space characters, I want to remove one. Should we do this with the g parameter? What does it do?
$(".inputonlytext").on("keyup", function() {
var regexp = /[^a-zA-Z ]*$/g; //For Only Text
if ($(this).val().match(regexp)) {
$(this).val($(this).val().replace(regexp, ''));
}
});
Aucun commentaire:
Enregistrer un commentaire