Aumentar y disminuir fuente

Buenas, estoy diseñando una web y he colocado dos imágenes cualquiera ara aumentar y dismunir el texto, pero no se porque no hacen ni´mención a ver si me podías averiguar donde esta el error, muchas gracias por anticipado
El código es el siguiente:
!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- cambiar tamaño de letra -->
<script >
FUENTE_DEFAULT = 9;
FUENTE_ACTUAL = 9;
FUENTE_MASPEQUENA = 7;
FUENTE_MASGRANDE = 18;
function MasTxt(div) {
FUENTE_ACTUAL = FUENTE_ACTUAL+2;
    if (FUENTE_ACTUAL > FUENTE_MASGRANDE) {
    FUENTE_ACTUAL = FUENTE_MASGRANDE
    }
var divID = document.getElementById(div);
divID.style.fontSize = FUENTE_ACTUAL+"pt";
}
function MenosTxt(div) {
FUENTE_ACTUAL = FUENTE_ACTUAL-2;
    if (FUENTE_ACTUAL < FUENTE_MASPEQUENA) {
    FUENTE_ACTUAL = FUENTE_MASPEQUENA
    }
var divID = document.getElementById(div);
divID.style.fontSize = FUENTE_ACTUAL+"pt";
}
</script>
</head>
<body>
<img src="imagenes/images.jpeg" width="87" height="135" border="0" onclick="MasTxt('texto');">
<img src="imagenes/%EDndice.jpeg" width="76" height="94" border="0"  onclick="MenosTxt('texto');">
<div id="texto">Estas fuentes cambiaran de tamaño</div>
</body>
</html>

1 respuesta

Respuesta
1
He probado el código que me has facilitado y funciona perfectamente... tanto en Mozilla Firefox como Internet Explorer 6...
¿Qué navegador usas?

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas