ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: HTML DOM :: HTML DOM images ¼¯ºÏ

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

HTML DOM images ¼¯ºÏ


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:1659 :: ::

Definition and Usage
¶¨ÒåÓëÓ÷¨

The images collection returns a reference to all Image objects in the document.
images¼¯ºÏ¿ÉÒÔ·µ»ØËùÓÐÔÚÎĵµÖÐͼƬ¶ÔÏóµÄ²Î¿¼

Syntax
Óï·¨

document.images[]


Example
¾ÙÀý

<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>


Try-It-Yourself Demos

Count the number of images in a document
¼ÆËãÎĵµÖÐÓжàÉÙÕÅͼƬ

ÆÀÂÛ (0) All