Image lowsrcプロパティ
Image オブジェクト
定義と用法
lowsrc プロパティは、画像の低解像度版の URL を設定または返します。
構文
imageObject.lowsrc=URL
ブラウザサポート
![]()
![]()
![]()
![]()
![]()
すべての主要ブラウザが lowsrc プロパティをサポートしています。
例
例
以下の例では、画像の低解像度版へのリンクを作成します。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>初心者チュートリアル(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 + '">低解像度</a>');
</script>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>初心者チュートリアル(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 + '">低解像度</a>');
</script>
</body>
</html>
試してみる »
Image オブジェクト その他の拡張