Ver Mensaje Individual
  #6 (permalink)  
Antiguo 20/02/2005, 08:32
Avatar de Carlitos
Carlitos
Usuario no validado
 
Fecha de Ingreso: mayo-2001
Ubicación: Zaragoza
Mensajes: 1.304
Antigüedad: 23 años
Puntos: 25
Hola.

Otra forma de hacerlo.
Código:
<script>
var a = 10
function fuente(bit)
{
if (bit == '1') a++
else a--
if (a < 10) a = 10
if (a > 16) a = 16
document.body.style.fontSize = a + "px"
}
</script>
<input type="button" value="+" onclick="fuente(1)">
<input type="button" value="-" onclick="fuente(0)">

Y como curiosidad: Pulsando la tecla CTRL y moviendo la rueda del ratón, también modificamos el tamaño de la fuente.

Un saludete.