Cita:
Iniciado por dleal100 jajajja me ganaste justamente ahorita ya tenia el codigo LOL
Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>titulo</title>
<script type="text/javascript">
function noce(){
var emo= document.getElementById("algo").value;
if(emo.length=="15")
{
///aca escribes tu codigo para que aga los que se te pegue la ganaaaaaaaaaaaaaaaa
document.getElementById("puke").innerHTML="<strong>EL CODIGO YA TIENE 15 DIGITOS LOL</strong>";
}
document.getElementById("caca").innerHTML=emo;
}
</script>
</head>
<body>
<form method="" action="">
escribe algo: <input type="text" id="algo" onkeydown="noce()" />
</form>
<div id="caca"></div>
<div id="puke"></div>
</body>
</html>
Si tambien estaria bien solo que el if estas comparando con "15" y no con 15 (cadena y no numero)