Oppure puoi bloccarli sin dall'immissione

codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Untitled</title>
<script language="JavaScript" type="text/javascript">
<!--
function scanInput(e) { 
 if (!e) {
  e           = window.event;
  carCorrente = String.fromCharCode(e.keyCode); 
 } else {
  carCorrente = String.fromCharCode(e.which); 
 } //  if (!e)
 listaCaratteridaOmettere = "°|[]*";
 if (listaCaratteridaOmettere.indexOf(carCorrente) > -1) {
  return false;
 } // if (listaCaratteridaOmettere.indexOf(carCorrente) > -1)
 return true;
} // function scanInput(e)

function assignScan() {
 document.getElementById("mio_testo").onkeypress  = scanInput;
 document.getElementById("mio_testo2").onkeypress = scanInput; 
} // function assignScan()
//-->
</script>

</head>
<body onload="assignScan()">
<input type="text" id="mio_testo" size="50">


<input type="text" id="mio_testo2" size="50">


</body>
</html>