JSFiddle - React, Tailwind, and code Playground
by Alex
HTML
<input type='text' id='target'>
JavaScript
document.getElementById("target").addEventListener('input', function() {
this.value = this.value.replace(/[abcde]/g, '');
});
by Alex
<input type='text' id='target'>
document.getElementById("target").addEventListener('input', function() {
this.value = this.value.replace(/[abcde]/g, '');
});