anun1

miércoles, 15 de marzo de 2023

Etiqueta marquee html y crear pantalla matrix

Hola hoy ablaremos de la etiqueta marquee la cual tienen algunos atributos pero solo veremos algunos, si se preguntan para que sirve esta etiqueta bueno les dire, esta etiqueta sirve para poner un texto en movimiento como marquesina.

ahora pasemos a la practica para poner un texto en movimiento como marquesina solo ponemos lo siguiete en el bloc de notas y aguardamos con la extencion HTML

<html>
<head><title>marquesina</title>
</head>
<body>
<marquee bgcolor="black" style="color:white;">hola soy una marqusina</marquee>
</body>
</html>

como vemos el movimiento es de derecha a izquierda pero si queremos que se muevan al reves de izquierda a derecha pondremos el atributo direction="right"  esto ahora que se mueva de izquierda a derecha nos quedaria el codigo asi

<html>
<head><title>marquesina</title>
</head>
<body>
<marquee bgcolor="black" direction="right" style="color:white;">hola soy una marqusina</marquee>
</body>
</html>

bueno ahora si queremos que se mueva para abajo y si mire de forma vertical, el codigo nos quedaria asi

<html>
<head><title>marquesina</title>
</head>
<body>
<marquee bgcolor="black" width="12" direction="down" style="color:white;">
h
o
l
a

s
o
y

u
n
a

m
a
r
q
u
s
i
n
a
</marquee>
</body>
</html>

como ven el texto ahora ira de arriba asia abajo se tiene un efecto como matrix, solo nos faltaria que el texto cambie cada segundo nos quedaria asi

<html>
<head><title>marquesina</title>
</head>
<body bgcolor="black">
<marquee bgcolor="black" id="10" width="12" direction="down" style="color:white;"></marquee>
<script>
ciclo();
function ciclo()
{
   var txt,digi,largo;
   
   largo=30;
   txt="\n"
   for(var x=0;x<=largo;x++)
   {
       digi=Math.floor(Math.random() * (122 - 97) + 97);
   txt= txt + String.fromCharCode(digi) + "\n";
   }
   document.getElementById("10").innerHTML=txt;
   setTimeout("ciclo()",100);
}
</script> 
</body>
</html>

bueno se pone interesante ahora si ponemos mas marquesinas unas 80 y agregamos un poco de codigo para que el texto de las marquesina cambie el codigo quedaria asi

<html>
<head><title>marquesina</title>
</head>
<body bgcolor="black">
<marquee bgcolor="black" id="0" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="1" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="2" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="3" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="4" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="5" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="6" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="7" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="8" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="9" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="10" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="11" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="12" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="13" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="14" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="15" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="16" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="17" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="18" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="19" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="20" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="21" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="22" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="23" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="24" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="25" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="26" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="27" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="28" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="29" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="30" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="31" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="32" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="33" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="34" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="35" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="36" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="37" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="38" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="39" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="40" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="41" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="42" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="43" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="44" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="45" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="46" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="47" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="48" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="49" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="50" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="51" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="52" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="53" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="54" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="55" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="56" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="57" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="58" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="59" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="60" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="61" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="62" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="63" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="64" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="65" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="66" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="67" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="68" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="69" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="70" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="71" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="72" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="73" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="74" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="75" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="76" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="77" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="78" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="79" width="12" direction="down" style="color:white;"></marquee>
<marquee bgcolor="black" id="80" width="12" direction="down" style="color:white;"></marquee>
<script>
var largo=new Array(80);
var txt=new Array(80);

for(var a=0;a<=80;a++)
{
   largo[a]=Math.floor(Math.random() * (40 - 10) + 10);
}
ciclo();

function ciclo()
{
   var x,digi;
   
   for(x=0;x<=80;x++)
   {
      txt[x]="\n";
   }
   for(x=0;x<=80;x++)
   {
      for(y=0;y<largo[x];y++)
  {
       digi=Math.floor(Math.random() * (122 - 97) + 97);
   txt[x]= txt[x] + String.fromCharCode(digi) + "\n";
      }
   }
   for(x=0;x<=80;x++)
   {
      document.getElementById(x).innerHTML=txt[x];
   }
   setTimeout("ciclo()",50);
}
</script> 
</body>
</html>

bueno espero les halla gustado saludos Flamer y si quieren probar los codigos solo copeen y pegen en el bloc de notas y aguardelon como matrix.html y aprobar saludos

sábado, 5 de marzo de 2022

Abrir, Agregar y Extraer archivos zip en javascript y html Codigo

 hola amigos aqui les dejo un codigo en javascript y HTML que sirbe para ver los archivos que estan dentro de un zip, asi como agregar y tambien extraerlos


 

Codigo


<html>

<head>

<title>ziper</title>

</head>

<body bgcolor="black">

<br><br><br><br>

<marquee><label style="color:white;">Zipeador By Flamer</label></marquee>

<br><br><br>

<center>

<label style="color:white;">Archivo ZIP:</label>

<input type="file" id="ruta" size="100" style="text-align:center;background:black;color:white;" id="zip"><br>

<label style="color:white;">Agregar ZIP:</label>

<input type="file" id="add" size="100" style="text-align:center;background:black;color:white;" id="zip" disabled><br><br>

<textarea id="log" rows="10" style="width:300;background:black;color:white;"></textarea>

<br><br>

<input type="button" value="Ver Archivos Del Zip" onclick="Abrir(1)">

<input type="button" value="Extraer Archivos Del Zip" onclick="Abrir(2)"><input type="button" value="Agregar Archivos Al Zip" onclick="agrega()"></center><script>

var app,fso

app   = new ActiveXObject("shell.application")

fso=new ActiveXObject("scripting.filesystemobject")

function agrega()

{

   var archi,f,z,file

   archi = document.getElementById("ruta").value

   f=fso.getfile(archi)

   z=f.type.indexOf("zip")

   

   if(fso.fileexists(archi) && z==-1)

   {

      document.getElementById("add").disabled=false

      document.getElementById("add").click() 

  file=document.getElementById("add").value

  app.namespace(archi).copyhere(file)

  alert("Archivo comprimido con exito")

   }

   else

   {

      alert("Archivo no existente o archivo incorrecto")

   }

}

function Abrir(op)

{

   var files,f,archi 

   archi = document.getElementById("ruta").value

   if(archi!="")

   {

      if(archi.indexOf(".zip")!=-1)

  {

          if(op==1)

  {

     ver(archi)

  }

  else if(op==2)

  {

     Extraction(archi)

  }

  }

      else

      {

     alert("El archivo seleccionado no es un Zip")

   }   

   }

   else

   {

      alert("Campo file Vacio")

   }   

}

function ver(archi)

{

   var f,files 

   files=app.namespace(archi).items()

   for(f=0;f<files.count;f++)

   {

      document.getElementById("log").value+=files.item(f) + "\n"

   }

}

function Extraction(archi)

{

   var nom,carpeta     

   

   nom=fso.getfile(archi)

   carpeta=nom.name.replace(".zip","")

   if(!fso.folderexists(carpeta))

   {

      fso.createfolder(carpeta)

  alert("carpeta "+ carpeta + " creada con exito")

   }

   app.namespace(carpeta).copyhere(app.namespace(archi).Items()) 

}

</script>

</body>

</html>


bueno saludos y espero les guste

jueves, 16 de diciembre de 2021

Administrador de tareas en javascript y html

Hola amigos aqui les dejare un codigo en html y javascript, se trata de un simple administrador de tareas donde podemos visualisar los procesos y tambien si queremos podremos terminarlos, el codigo es simple asi que primero creamos el formulario en html en el body ponemos una etiqueta center para que quede centrado y despues crearemos 2 cuadro de texto uno de ellos con la etiqueta textarea y depaso un boton asi

<center>

<textarea id="log" rows="30" style="width:500;"></textarea><br><br>

Terminar proceso por su pid:<input type="text" id="pide" style="text-align:center;">

<input type="button" value="Terminar Proceso" onclick="list()">

</center>

luego en de esto creamos la etiqueta script donde ira el codigo donde crearemos la funcion list() que llebara lo siguiente

function list()

{

   var wmi,p,id //declaramos la variables a usar

   

   wmi=GetObject("winmgmts:") //creamos el objecto wmi

   p=new Enumerator(wmi.instancesOf("win32_process")) //enumeramos o mejor dicho optenemos la lista de procesos

   document.getElementById("log").value="===============================================\npid--------Proceso\n" //inicializamos el cuadro de texto textarea

   document.getElementById("log").value+="===============================================" //aqui le agregamos mas cosas al textarea

   

   id=document.getElementById("pide").value //optenemos el pid del proceso a terminar

   

   for(;!p.atEnd();p.moveNext()) //inicia un ciclo for con la lista de procesos enumerados en la variable p

   {

      if(p.item().ProcessId==id) //pregunta por el pid del preceso a terminar

      {

     p.item().Terminate() //termina el proceso

document.getElementById("pide").value=""  //inicialisa el cuadro de texto a vacio

  }

  else //si no es igual el pid o no se encuentra ejecuta la siguiente linea el else

  {

         document.getElementById("log").value+="\n" + p.item().ProcessId + "--------"+ p.item().name //aqui ira creando la lista de procesos en el texto o mejor dicho en el textarea la lista de procesos con sus respetivos pid

      }

   }

}

bueno ahora les dejare el codigo completo y una imagen de el por si lo quieren probar solo copean y pegan el en bloc de notas y aguardan con la extencion hta




<html>

<head><title>Administrador de tareas</title>

</head>

<body>

<center>

<textarea id="log" rows="30" style="width:500;"></textarea><br><br>

Terminar proceso por su pid:<input type="text" id="pide" style="text-align:center;">

<input type="button" value="Terminar Proceso" onclick="list()">

</center>

<script>

list()

function list()

{

   var wmi,p,id

   

   wmi=GetObject("winmgmts:")

   p=new Enumerator(wmi.instancesOf("win32_process"))

   

   document.getElementById("log").value="===============================================\npid--------Proceso\n"

   document.getElementById("log").value+="==============================================="

   

   id=document.getElementById("pide").value

   

   for(;!p.atEnd();p.moveNext())

   {

      if(p.item().ProcessId==id)

      {

     p.item().Terminate()

document.getElementById("pide").value=""

  }

  else

  {

         document.getElementById("log").value+="\n" + p.item().ProcessId + "--------"+ p.item().name

      }

   }

}

</script>

</body>

</html>

bueno saludos Flamer espero les halla gustado   



miércoles, 8 de diciembre de 2021

juego simple en javascript y html

 hola aqui les dejare un simple juego hecho en html y javascript, no soy bueno programando juegos o para la programacion en javascript pero por algo se empiesa, el juego es simple el cual consiste en no dejar que la pelotita caiga y asi ir sumando puntos asi que si quieren hecharle un vistaso al codigo aqui abajo se los dejare por si lo quieren checar solo copean y pegan en el bloc de notas y aguardar con la extencion html


Codigo 

<html>

<head><title>Mi pelotita</title>

</head>

<body onkeypress="barra()" onkeydown="barra()">

<div id="bola" style="border-radius:20px;background-color:red;width:30px;height:30px;position:absolute;top:0;left:0;"></div>

<div id="base" style="background-color:black;width:100px;height:10;position:absolute;top:600;left:0">

<div id="puntos" style="background-color:blue;width:100;height:30;position:fixed;top:700;left:500;color:white;text-align:center;">0</div>

<script>

var xx=0,yy=0

setTimeout("move()",60)

function move()

{

  var x  = parseInt(document.getElementById("bola").style.left)

  var y  = parseInt(document.getElementById("bola").style.top)

  var by = parseInt(document.getElementById("base").style.top)

  var bx = parseInt(document.getElementById("base").style.left)

  

  if(x>screen.width)

  {

     xx=1

  }

  if(x<=0)

  {

     xx=0

  }

  if(y>screen.height)

  {

     yy=1

document.getElementById("puntos").innerHTML=0

  }

  else if(y==by && x>=bx && x<=(bx+100))

  {

     yy=1

var puntos=parseInt(document.getElementById("puntos").innerHTML)

    puntos++

    document.getElementById("puntos").innerHTML=puntos

  }

  if(y<=0)

  {

     yy=0

  }

  

  if(xx==1)

  {

     x-=10

  }

  else

  {

     x+=10

  }

  

  if(yy==1)

  {

     y-=10

  }

  else

  {

     y+=10

  }  

  document.getElementById("bola").style.left=x

  document.getElementById("bola").style.top=y

  setTimeout("move()",60)

}

function barra()

{

  var x=parseInt(document.getElementById("base").style.left)

  

  if(event.keyCode==39 && x<screen.width) 

  {

     document.getElementById("base").style.left=x+80

  }  

  if(event.keyCode==37 && x>0) 

  {

     document.getElementById("base").style.left=x-80

  }  

}

</script>

</body>

</html>


bueno saludos y espero le sea de su agrado, nota: se puede aumentar el nivel poniendo bloques a destruir pero eso se los dejo a ustedes por si quieren seguirle



martes, 7 de diciembre de 2021

Codigo Fuente del Sudoku en html y javascript

 hola amigo como miro que tiene varias visitas el sudoku en vb6 este

https://elblogdeflamer.blogspot.com/2015/10/codigo-fuente-del-sudoku-en-visual.html

y como vb6 ya quedo obsoleto vengo ahora con el mismo codigo pero ahora en html y javascript, por si lo quieren jugar es solo cuestion de copiar el codigo y pegarlo en el bloc de notas y aguardarlo con la extencion html.

ahora qui les dejo el codigo

<html>
<head>
</head>
<body>
<marquee style="background-color:black;color:white;font-size:20;">Sudoku   ...:::By Flamer:::...</marquee><br><br><br><br><br><br><br><br><br><br>
<center>
<br /><table>
<tbody>
<tr>
<td><input id="00" maxlength="1" name="celda00" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="01" maxlength="1" name="celda01" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="02" maxlength="1" name="celda02" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="03" maxlength="1" name="celda03" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="04" maxlength="1" name="celda04" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="05" maxlength="1" name="celda05" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="06" maxlength="1" name="celda06" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="07" maxlength="1" name="celda07" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="08" maxlength="1" name="celda08" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
</tr>
<tr>
<td><input id="10" maxlength="1" name="celda10" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="11" maxlength="1" name="celda11" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="12" maxlength="1" name="celda12" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="13" maxlength="1" name="celda13" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="14" maxlength="1" name="celda14" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="15" maxlength="1" name="celda15" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="16" maxlength="1" name="celda16" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="17" maxlength="1" name="celda17" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="18" maxlength="1" name="celda18" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
</tr>
<tr>
<td><input id="20" maxlength="1" name="celda20px" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="21" maxlength="1" name="celda21" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="22" maxlength="1" name="celda22" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="23" maxlength="1" name="celda23" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="24" maxlength="1" name="celda24" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="25" maxlength="1" name="celda20px" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="26" maxlength="1" name="celda26" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="27" maxlength="1" name="celda27" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="28" maxlength="1" name="celda28" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
</tr>
<tr>
<td><input id="30" maxlength="1" name="celda30" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="31" maxlength="1" name="celda31" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="32" maxlength="1" name="celda32" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="33" maxlength="1" name="celda33" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="34" maxlength="1" name="celda34" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="35" maxlength="1" name="celda20px" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="36" maxlength="1" name="celda36" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="37" maxlength="1" name="celda37" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="38" maxlength="1" name="celda38" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
</tr>
<tr>
<td><input id="40" maxlength="1" name="celda40" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="41" maxlength="1" name="celda41" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="42" maxlength="1" name="celda42" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="43" maxlength="1" name="celda43" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="44" maxlength="1" name="celda44" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="45" maxlength="1" name="celda45" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="46" maxlength="1" name="celda46" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="47" maxlength="1" name="celda47" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="48" maxlength="1" name="celda48" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
</tr>
<tr>
<td><input id="50" maxlength="1" name="celda50" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="51" maxlength="1" name="celda51" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="52" maxlength="1" name="celda52" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="53" maxlength="1" name="celda53" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="54" maxlength="1" name="celda54" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="55" maxlength="1" name="celda55" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="56" maxlength="1" name="celda56" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="57" maxlength="1" name="celda57" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="58" maxlength="1" name="celda58" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
</tr>
<tr>
<td><input id="60" maxlength="1" name="celda60" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="61" maxlength="1" name="celda61" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="62" maxlength="1" name="celda62" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="63" maxlength="1" name="celda63" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="64" maxlength="1" name="celda64" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="65" maxlength="1" name="celda65" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="66" maxlength="1" name="celda66" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="67" maxlength="1" name="celda67" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="68" maxlength="1" name="celda68" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
</tr>
<tr>
<td><input id="70" maxlength="1" name="celda70" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="71" maxlength="1" name="celda71" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="72" maxlength="1" name="celda72" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="73" maxlength="1" name="celda73" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="74" maxlength="1" name="celda74" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="75" maxlength="1" name="celda75" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="76" maxlength="1" name="celda76" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="77" maxlength="1" name="celda77" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="78" maxlength="1" name="celda78" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
</tr>
<tr>
<td><input id="80" maxlength="1" name="celda80" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="81" maxlength="1" name="celda81" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="82" maxlength="1" name="celda82" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="83" maxlength="1" name="celda83" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="84" maxlength="1" name="celda84" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="85" maxlength="1" name="celda85" style="background-color: white; color: black; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="86" maxlength="1" name="celda86" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="87" maxlength="1" name="celda87" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td>
<td><input id="88" maxlength="1" name="celda88" style="background-color: black; color: white; font-size: 20px; height: 30px; text-align: center; width: 30px;" type="text" /></td></tr>
</tbody></table>
<br /><br />
<label id="005" style="color: blue; font-size: 12pt;"></label><br />
<input name="boton3" onclick="Generar()" type="button" value="Generar Nuevo Tablero" />
<input name="boton4" onclick="Revisar()" type="button" value="Revisar Mi Respuestas" />
<input name="boton4" onclick="Solucion()" type="button" value="Ver Solucion" />
</center>
<script languaje="javascript">
var clave=new Array(8);

for(var k=0;k<9;k++)
{
   clave[k]=new Array(8);
}
function imprimirSudoku()
{
  for(var y=0;y<9;y++)
  {
    for(var x=0;x<9;x++)
    {
       if((parseInt((10-1+1)*Math.random()+1))<6) 
       {
         document.getElementById((x.toString())+(y.toString())).value=clave[y][x];
         document.getElementById((x.toString())+(y.toString())).disabled=true;
       }
       else
       {
         document.getElementById((x.toString())+(y.toString())).value="";
       }  
    }
  }    
}

function Revisar()
{
  var y,x,z,v,vx,vy,conta=0;

   for(y=0;y<9;y++)
   {
      for(x=0;x<9;x++)
      {
         v=document.getElementById((x.toString())+(y.toString())).value;

          for(z=0;z<9;z++)
          {
            vy=document.getElementById((x.toString())+(z.toString())).value;
             if(z!=y)
             {
                if(v==vy)
               {  
                   conta++;
               } 
             }
            vx=document.getElementById((z.toString())+(y.toString())).value;
             if(z!=x)
             {
                if(v==vx)
                {
                   conta++;
                } 
             }   
          }
      }
   }
 if(conta==0)
 {
    document.getElementById("005").innerHTML="Correcto";
 }
 else
 {
   document.getElementById("005").innerHTML="Incorrecto";
 }  
}
function Solucion()
{
for(var y=0;y<9;y++)
  {
    for(var x=0;x<9;x++)
    {   
       document.getElementById((x.toString())+(y.toString())).value=clave[y][x];
       document.getElementById((x.toString())+(y.toString())).disabled=true;
    }
  }
}
function generarSudoku()
{
 var numeros=new Array(8);
 var x,y,po,z;

 for(x=0;x<9;x++)
 {
   for(y=0;y<9;y++)
   {
      document.getElementById((x.toString())+(y.toString())).disabled=false;
   } 
 }
 for(x=0;x<9;x++)
 {
     numeros[x]=x+1;
 }
 x--;
 z=0;
 while(x>-1)
 {
    po=parseInt((x-0+1)*Math.random()+0);
    clave[0][z]=numeros[po];
 for(y=po;y<x;y++)
 {
    numeros[y]=numeros[y+1];
 }
 x--;
 z++;
 }
 //1
 clave[1][0]=clave[0][3];
 clave[1][1]=clave[0][4];
 clave[1][2]=clave[0][5];
 //2
 clave[2][0]=clave[0][6];
 clave[2][1]=clave[0][7];
 clave[2][2]=clave[0][8];
 
 
 //3
 clave[1][3]=clave[0][6];
 clave[1][4]=clave[0][7];
 clave[1][5]=clave[0][8];
 //4
 clave[2][3]=clave[0][0];
 clave[2][4]=clave[0][1];
 clave[2][5]=clave[0][2];
 
 
 //5
 clave[1][6]=clave[0][0];
 clave[1][7]=clave[0][1];
 clave[1][8]=clave[0][2];
 //6
 clave[2][6]=clave[0][3];
 clave[2][7]=clave[0][4];
 clave[2][8]=clave[0][5];
 
 
 //7
 clave[3][0]=clave[0][1];
 clave[3][1]=clave[0][2];
 clave[3][2]=clave[1][0];
 //8
 clave[4][0]=clave[1][1];
 clave[4][1]=clave[1][2];
 clave[4][2]=clave[2][0];
 //9
 clave[5][0]=clave[2][1];
 clave[5][1]=clave[2][2];
 clave[5][2]=clave[0][0];
 
 
 //10
 clave[3][3]=clave[4][0];
 clave[3][4]=clave[4][1];
 clave[3][5]=clave[4][2];
 //11
 clave[4][3]=clave[5][0];
 clave[4][4]=clave[5][1];
 clave[4][5]=clave[5][2];
 //12
 clave[5][3]=clave[3][0];
 clave[5][4]=clave[3][1];
 clave[5][5]=clave[3][2];
 
 
 //13
 clave[3][6]=clave[5][0];
 clave[3][7]=clave[5][1];
 clave[3][8]=clave[5][2];
 //14
 clave[4][6]=clave[3][0];
 clave[4][7]=clave[3][1];
 clave[4][8]=clave[3][2];
 //15
 clave[5][6]=clave[4][0];
 clave[5][7]=clave[4][1];
 clave[5][8]=clave[4][2];
 
 
 //16
 clave[6][0]=clave[3][1];
 clave[6][1]=clave[3][2];
 clave[6][2]=clave[4][0];
 //17
 clave[7][0]=clave[4][1];
 clave[7][1]=clave[4][2];
 clave[7][2]=clave[5][0];
 //18
 clave[8][0]=clave[5][1];
 clave[8][1]=clave[5][2];
 clave[8][2]=clave[3][0];
 
 
 //19
 clave[6][3]=clave[7][0];
 clave[6][4]=clave[7][1];
 clave[6][5]=clave[7][2];
 //20
 clave[7][3]=clave[8][0];
 clave[7][4]=clave[8][1];
 clave[7][5]=clave[8][2];
 //21
 clave[8][3]=clave[6][0];
 clave[8][4]=clave[6][1];
 clave[8][5]=clave[6][2];
 
 
 //22
 clave[6][6]=clave[8][0];
 clave[6][7]=clave[8][1];
 clave[6][8]=clave[8][2];
 //23
 clave[7][6]=clave[6][0];
 clave[7][7]=clave[6][1];
 clave[7][8]=clave[6][2];
 //24
 clave[8][6]=clave[7][0];
 clave[8][7]=clave[7][1];
 clave[8][8]=clave[7][2];
 
}
function Generar()
{   
   document.getElementById("005").innerHTML="";
   generarSudoku();
   imprimirSudoku();
}
</script>
</body>
</html>

espero les sea de su agrado y ha alguien le sirva saludos Flamer