Image lowsrc 屬性

定義和用法
lowsrc 屬性可設(shè)置或返回圖像的低分辨率版本的 URL。
語(yǔ)法
imageObject.lowsrc=URL
瀏覽器支持
所有主要瀏覽器都支持 lowsrc 屬性
實(shí)例
實(shí)例
下面的例子可創(chuàng)建一個(gè)指向圖像的低分辨率版本的鏈接:
<html>
<body>
<img id="compman" src="compman.gif"
lowsrc="compman_lowres.gif" alt="Computerman">
<br>
<script>
var x=document.getElementById("compman");
document.write('<a href="' + x.lowsrc + '">Low resolution</a>');
</script>
</body>
</html>
<body>
<img id="compman" src="compman.gif"
lowsrc="compman_lowres.gif" alt="Computerman">
<br>
<script>
var x=document.getElementById("compman");
document.write('<a href="' + x.lowsrc + '">Low resolution</a>');
</script>
</body>
</html>
嘗試一下 ?

更多建議: