Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    May 2005
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Link Extractor Mod to Get Page Domains

    Hi,


    O would like modify DynamicDrive's Link Extractor below to get Just the Domain name also. Separated in three columns: title,link,domain (.com,.net,.uk,.it )

    Can any one help with this script...... script follows :

    Thanks JLee



    <script language="JavaScript1.2">

    function extractlinks(){
    var links=document.all.tags("A")
    var total=links.length
    var win2=window.open("","","menubar,scrollbars")
    win2.document.write("<h2>Total Links="+total+"</h2><br>")
    for (i=0;i<total-1;i++){
    win2.document.write(links[i].outerHTML+"<br>")
    }
    }
    //-->
    </script>
    <button onClick="extractlinks()">Extract Links</button>

  • #2
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    911
    Thanks
    0
    Thanked 120 Times in 119 Posts
    if you have this href
    "http://www.codingforums.com/showthread.php?"
    what string must then be returned


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •