document.links: Links in a web page

Here is the syntax to get numbr of links in a webpage.
Here is an example

<script type="text/javascript">
The output is here

The first link is here

docment.links[] is an array so we can display all its elements like this.
for (i=0;i<document.links.length;i++)
document.write(document.links[i] + "<br >");
Output is here

document Object URL of the page
Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer