Foros del Web » Creando para Internet » HTML »

Como hacer zoom a un jpg

Estas en el tema de Como hacer zoom a un jpg en el foro de HTML en Foros del Web. Me gustaria hacer zoom en una imagen presionando una lupa mas o lupa menos Sabeis como puedo hacer esto de una forma sencilla Gracias...
  #1 (permalink)  
Antiguo 11/10/2012, 03:23
 
Fecha de Ingreso: marzo-2012
Ubicación: Galicia
Mensajes: 335
Antigüedad: 12 años, 1 mes
Puntos: 33
Como hacer zoom a un jpg

Me gustaria hacer zoom en una imagen presionando una lupa mas o lupa menos

Sabeis como puedo hacer esto de una forma sencilla

Gracias
  #2 (permalink)  
Antiguo 11/10/2012, 05:41
Avatar de IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: Como hacer zoom a un jpg

con javascript
Cita:
<!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=utf-8" />
<title></title>
<script type="text/javascript">
function redimensionar (accion) {
var height, width
var alto = document.getElementById("mesa").offsetHeight;
var ancho = document.getElementById("mesa").offsetWidth;
if (accion == 'sumar') {
height = parseInt(alto+10);
width = parseInt(ancho+10);
document.getElementById("mesa").style.height = height + "px";
document.getElementById("mesa").style.width = width + "px";
}
else
{
height = parseInt(alto-10);
width = parseInt(ancho-10);
document.getElementById("mesa").style.height = height + "px";
document.getElementById("mesa").style.width = width + "px";
}
}
</script>
</head>
<body>
<img src="iconos/anixmas11.gif" id="mesa" width="50px" height="53px" /><br/>
<input type="button" value="+" onclick="redimensionar('sumar')" /><br/>
<input type="button" value="-" onclick="redimensionar()" />
</body>
</html>
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}
  #3 (permalink)  
Antiguo 11/10/2012, 05:59
Avatar de emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: Como hacer zoom a un jpg

Acá tenés algo que puede servir
http://foros.emprear.com/javascript/.../castelar.html
Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.

Etiquetas: jpg, zoom, formulario
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:51.