JSFiddle - React, Tailwind, and code Playground
by villard
HTML
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<input id="t" />
JavaScript
$(function(){
$('#t').keypress(function(e){
var txt = String.fromCharCode(e.which);
console.log(txt + ' : ' + e.which);
if(!txt.match(/[A-Za-z0-9+#.]/))//+#-.
{
return false;
}
});
});