set di caratteri:
- ASCII
- Latin 1 (ISO-8859-1)
- Greco
- punteggiatura generica
- frecce
- operatori matematici
- ASCII
- Latin 1 (ISO-8859-1)
- Greco
- punteggiatura generica
- frecce
- operatori matematici
<div id="contenitore"> <div id="testo"> blablblballblablblablabla blablablabbla </div> </div>
var point_board4 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
for (var i=0; i < point_board4.length ; i++) {
point_board4[i] = board4.create('point',[0,i],{visible:false});
}
Il semplice ciclo for poi, a dispetto dei cicli ForEach, for in, $.each e varie amenità di jquery risulta essere il migliore. (Fonte: jsperf.com)
$("#inputbox").live('keydown', function(e) {
var key = String.fromCharCode(e.keyCode);
if (e.keyCode >96 && e.keyCode<105) return e.keyCode;
// per prendere anche la tastiera numerica
if (e.which == 65) {return e.keyCode; } // prende la a minuscola
if (e.which == 66) {return e.keyCode; } // prende la b minuscola
if (e.which == 88) {return e.keyCode; } // prende la x minuscola
if (e.which == 89) {return e.keyCode; } // prende la y minuscola
if (isNaN(key)) return false; // altri tasti che non siano numeri
if ( e.shiftKey /* Shift */
|| e.which == 9 /* Tab */
|| e.which == 32 /* barra spazio */
|| e.which == 27 /* Escape Key */
|| e.which == 17 /* Control Key */
|| e.which == 91 /* Windows Command Key */
|| e.which == 19 /* Pause Break */
|| e.altKey /* Alt Key */
|| e.which == 93 /* Right Click Point Key */
|| ( e.which >= 35 && e.which <= 40 ) /* Home, End, Arrow Keys */
|| e.which == 45) /* Insert Key */
{
return false;
}
});