Image lowsrc 屬性

定義和用法
lowsrc 屬性可設置或返回圖像的低解析度版本的 URL。
語法
imageObject.lowsrc=URL
流覽器支持
所有主要流覽器都支持 lowsrc 屬性
實例
實例
下麵的例子可創建一個指向圖像的低解析度版本的鏈接:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>IT研修(xuhuhu.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>IT研修(xuhuhu.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>
