
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How to work with document.images in JavaScript?
Use the document.images property in JavaScript to get the number of <img> tags in a document.
Example
You can try to run the following code to implement document.images property in JavaScript.
<!DOCTYPE html> <html> <head> <title>JavaScript Example</title> </head> <body> <h1>TutorialsPoint Tutorials</h1> <img src="/javascript/images/javascript-mini-logo.jpg"/><br> <img src="/html5/images/html5-mini-logo.jpg"/> <script> var num = document.images.length; document.write("<br>How many images? "+num); </script> </body> </html>
- Related Articles
- How to return the number of images in a document with JavaScript?
- How to work with images in Bokeh (Python)?
- How to work with Structs in JavaScript?
- How to work with document.anchors in JavaScript?
- How to work with document.body in JavaScript?
- How to work with document.embeds in JavaScript?
- How to work with document.documentElement in JavaScript?
- How to work with document.head in JavaScript?
- How to work with document.forms in JavaScript?
- How to work with document.links in JavaScript?
- How to work with document.title in JavaScript?
- How do Document Databases Work?
- How to work with removeEventListener() method in JavaScript?
- How to work with delete operator in JavaScript?
- How to work with Stored JavaScript in MongoDB?

Advertisements