本文實例講述了html的DOM中document對象images集合用法。分享給大家供大家參考。具體分析如下:
images 集合可返回對文檔中所有 Image 對象的引用。
語法:
例子:
<script type="text/javascript">
document.write("This document contains: ")
document.write(document.images.length + " images.")
</script>
</body>
</html>
希望本文所述對大家的javascript程序設計有所幫助。
新聞熱點
疑難解答
圖片精選