The links collection returns a collection of all elements and with a href attribute in the document.
- If element is missing the href attribute then element will be excluded from the collection.
- Type of document.links is object
Example: If document contains 10 links with href tag then document.links.length will return number 10.
You can get the URL of the first link using index 0 in document.links[0].href
To get all links from the document use the following JavaScript Code:
- Home
- _About
- _Contact
- CDN
- _jQuery Library
- _Moment Library
- _Bootstrap Library, CSS, Font
- Nuget
- Tools
- _EXCEL To JSON
- _EXCEL To BSON
- _Get Date Array
- _JSON To HTML Table
- _HTML Entity Encoder & Decoder
- _ObjectId to Timestamp
- _Keyboard Key Values
- _Yootube Video Thumbnail
- JavaScript
- jQuery
- Asp.Net C#
- MSSQL
- MongoDB
- Blogger
- Tech
No comments