Ver Mensaje Individual
  #8 (permalink)  
Antiguo 17/12/2002, 13:13
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 22 años, 4 meses
Puntos: 61
Por dar gusto y seguir jugando con este código he implantado la posibilidad de qe esté disabled o que no lo esté:

Código:
<html>
<head>
<script>
texto="";
var z=0;
function anadir(letra){

texto=barra.value;
texto=texto+letra;
barra.value=texto;
}
function habilitar(){
z=z+1
if(z==1){barra.disabled=true;z=-1}
else{barra.disabled=false}
}
</script>
    
</head>

<body style="font:normal 10px/10px verdana">
<input type="Text" name="barra" style="width:300px;border:solid 1px black" ><br>

<input type="checkbox" name="habilitado" onchange="habilitar()" value="" >Protegido contra escritura directa?
<br>
<br>
<br>
<br>
<br><div id="botones" style="font:normal 8px/4px verdana"></div>
<script>
var letras="";
var p=0;
for (a=65;a<91;a++){
letras=letras+"<input style='width:20px;heiht:20px;' type='Button' value=&#"+a+" onclick=anadir('&#"+a+"')>&nbsp;";
p=p+1;
if(p==9){p=0;letras=letras+"<br><br>";}
}
botones.innerHTML=letras+"<input style='width:20px;heiht:20px;' type='Button' value=&copy onClick=alert('KarlanKas-2002')><br><br><input style='width:205px;height:22px;' type='Button' value='espacio' onclick=anadir('&#160')>";

</script>

</body>
</html>
__________________
Cómo escribir

No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia.