专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 图形/图像

html DOM document对象images会合

发布时间:2011-06-27 19:36:19 文章来源:www.iduyao.cn 采编人员:星星草
html DOM document对象images集合

images 集合可返回对文档中所有 Image 对象的引用。

语法:

document.images[]

为了与 0 级 DOM 兼容,该集合不包括由 <object> 标记定义的图像。

例子:

<html>

<body>
<img border="0" src="hackanm.gif" width="48" height="48">
<br />
<img border="0" src="compman.gif" width="107" height="98">
<br /><br />

<script type="text/javascript">
document.write("This document contains: ")
document.write(document.images.length + " images.")
</script>
</body>

</html>
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: