Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/05/2012, 07:20
chinanzio
 
Fecha de Ingreso: marzo-2007
Mensajes: 82
Antigüedad: 17 años, 1 mes
Puntos: 21
Respuesta: Bloquear teclas en campo de texto readonly

Prueba ponerle un return false en el onkeydown cuando esté desabilitado

Código HTML:
Ver original
  1. <input type="text" onkeydown="return false;" id="el-id" />

Con javascript sería:
Código Javascript:
Ver original
  1. var elinput = document.getElementById("el-id");
  2. elinput.onkeydown = function() {
  3.     return false;
  4. }
__________________
Hazle un favor a tu cerebro y juega Ajedrez online
Chess online