Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/03/2012, 15:00
inicio_rave_
 
Fecha de Ingreso: marzo-2012
Mensajes: 7
Antigüedad: 12 años, 1 mes
Puntos: 0
Mensaje necesito codigo.. numero aleatorio cada vez qe actualiza la pagina.

necesito ayuda en numeros aleatorios... qe cambia de posicion los numeros cada vez qe actualiza la pagina.


codigo fuente:


<script language="javascript">
function escribe(v){
c=document.getElementById("valor").value;
x=c+v;
document.getElementById("valor").value=x;
}
</script>
</head>
<body>
<table>
<tr>
<td>
<input type="text" id="valor" name="valor" readonly>
</td>
</tr>
<tr>
<td>
<input type="button" value="7"
onclick="escribe(this.value)">
</td>
<td>
<input type="button" value="8"
onclick="escribe(this.value)">
</td>
<td>
<input type="button" value="9"
onclick="escribe(this.value)">
</td>
</tr>
<tr>
<td>
<input type="button" value="4"
onclick="escribe(this.value)">
</td>
<td>
<input type="button" value="5"
onclick="escribe(this.value)">
</td>
<td>
<input type="button" value="6"
onclick="escribe(this.value)">
</td>
</tr>
<tr>
<td>
<input type="button" value="1"
onclick="escribe(this.value)">
</td>
<td>
<input type="button" value="2"
onclick="escribe(this.value)">
</td>
<td>
<input type="button" value="3"
onclick="escribe(this.value)">
</td>
</tr>
<tr>
<td>
<input type="button" value="0"
onclick="escribe(this.value)" style="width: 100%">
</td>
</tr>
<tr>
<td colspan="3">
<input type="button" value="Limpiar"
onclick="document.getElementById('valor').value='' ;" style="width: 100%">
</td>
</tr>
</table>
</body>