HTML DOM Image longDesc property
Definition and Usage
longDesc property sets or returns the picture longDesc property values.
longdesc attribute specifies the URL of the document containing the image description.
grammar
imageObject.longDesc=URL
Browser Support
All major browsers support longDesc property
Examples
Examples
Returns image longDesc property values:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
</head>
<body>
<img id="compman" src="compman.gif" longdesc="description.htm" alt="Computerman" width="107" height="98">
<br>
<p>longdesc属性的值为:
<script>
var x=document.getElementById("compman");
document.write(document.getElementById("compman").longDesc);
</script>
</p>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
</head>
<body>
<img id="compman" src="compman.gif" longdesc="description.htm" alt="Computerman" width="107" height="98">
<br>
<p>longdesc属性的值为:
<script>
var x=document.getElementById("compman");
document.write(document.getElementById("compman").longDesc);
</script>
</p>
</body>
</html>
try it"
Image Object