当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM longDesc属性

HTML DOM
DOM 介绍
HTML DOM 举例
DOM 参考
DOM 摘要
HTML DOM 实例
DOM Anchor
DOM Applet
DOM Area
DOM Base 对象
DOM Basefont对象
DOM Body 对象
DOM Document 对象
DOM 事件
DOM Form 对象
DOM Frame 对象
DOM Frameset 对象
DOM History
DOM Iframe 对象
DOM Image 对象
HTML DOM Button对象

HTML DOM longDesc属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 375 ::
收藏到网摘: n/a

Definition and Usage
定义与用法

The longDesc property sets or returns a URL to a document containing a description of the image.
longDesc属性可设置或返回包含图片描述文档的URL

This description is a supplement to the "alt" attribute, and it can be useful for non-visual user agents.
描述是在"alt"属性上进行补充的,这些文字在那些非视觉用户代理很有用。

Syntax
语法

imageObject.longDesc=URL


Example
举例

The following example creates a link to the description of the image:
建立一个能够描述图片的链接:

<html>
<body>
<img id="compman" src="compman.gif"
longdesc="compman_description.htm" alt="Computerman" />

<br />
<script type="text/javascript">
var x=document.getElementById("compman");
document.write("Description for image: ");
document.write('<a href="' + x.longDesc + '">Description</a>');
</script>
</body>
</html>


Try-It-Yourself Demos
尝试与演示

Create a link to the long description of an image
建立一个对图片进行长篇描述的连接

评论 (0) All

登陆 | 还没注册?