Onkeydown, I run the following JavaScript:
Onkeydown
function ThisOnKeyDown(el) { if (el.title == \'textonly\') { !(/^[A-Za-zÑñ-\\s]*$/i).test(e
$('.key-filter').keypress(function () { if (event.key.replace(/[^\w\-.]/g,'')=='') event.preventDefault(); });
then add the key-filter class to your input if using jquery or
just put the charaters you want to allow inside the [] after the ^. this allows all letters numbers _ - and .