Image lowsrcPropiedad
Objeto Image
Definición y uso
La propiedad lowsrc establece o devuelve la URL de la versión de baja resolución de una imagen.
Sintaxis
imageObject.lowsrc=URL
Soporte del navegador
![]()
![]()
![]()
![]()
![]()
Todos los navegadores principales soportan la propiedad lowsrc.
Ejemplo
Ejemplo
El siguiente ejemplo crea un enlace que apunta a la versión de baja resolución de la imagen:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ejemplo(example.com)</title>
</head>
<body>
<img id="compman" src="compman.gif.html" lowsrc="compman_lowres.gif.html" alt="Computerman" width="107" height="98">
<br>
<script>
var x=document.getElementById("compman");
document.write('<a href="' + x.lowsrc + '">Baja resolución</a>');
</script>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>Ejemplo(example.com)</title>
</head>
<body>
<img id="compman" src="compman.gif.html" lowsrc="compman_lowres.gif.html" alt="Computerman" width="107" height="98">
<br>
<script>
var x=document.getElementById("compman");
document.write('<a href="' + x.lowsrc + '">Baja resolución</a>');
</script>
</body>
</html>
Pruébalo »
Objeto Image Otras extensiones