Nell'head metti;
Nel bodyCodice PHP:<script type="text/javascript">
function count(){
var lunghezza = new String(document.getElementById("lettere").value)
var totale = lunghezza.length * 2;
alert("Il totale della stringa " + lunghezza + " è: " + totale);
}
</script>
Così funziona..Codice PHP:<input type="textbox" onkeyup="count()" id="lettere" />

Rispondi quotando