HTML DOM propriété Image lowsrc
Définition et utilisation
lowsrc ensembles de propriétés ou renvoie la version basse résolution de l'image URL.
grammaire
imageObject.lowsrc=URL
support du navigateur
Tous les principaux navigateurs prennent en charge la propriété lowsrc
Exemples
Exemples
L'exemple suivant crée une version basse résolution des points d'image au lien:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
</head>
<body>
<img id="compman" src="compman.gif" lowsrc="compman_lowres.gif" alt="Computerman" width="107" height="98">
<br>
<script>
var x=document.getElementById("compman");
document.write('<a href="' + x.lowsrc + '">低分辨率</a>');
</script>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
</head>
<body>
<img id="compman" src="compman.gif" lowsrc="compman_lowres.gif" alt="Computerman" width="107" height="98">
<br>
<script>
var x=document.getElementById("compman");
document.write('<a href="' + x.lowsrc + '">低分辨率</a>');
</script>
</body>
</html>
Essayez »
objet image