document.embeds.length
JavaScript 1.1+, JScript 1.0+ Nav3+, IE 3+, Opera3+ Syntax
document.embeds.length
Description
The length property contains the number of objects that are in the embeds[] array.
Example
Listing 7.97 uses the length property to display the number of embedded objects in an HTML document.
Listing 7.97 List the Number of Embedded Objects
<html> <h2>A Circle</h2> <embed src="circle.gif"> <h2>A Square</h2> <embed src="square.gif"> <script language="JavaScript"> <!-- Hide //Display the length of the embeds array. document.write(document.embeds.length," embedded objects."); //Hide End ---> </script> </html> |
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.