Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. read anchor tag problem

read anchor tag problem

Scheduled Pinned Locked Moved ASP.NET
javadata-structurestoolshelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vishnukamath
    wrote on last edited by
    #1

    hi, i need to put all anchor tags into an array, in java script. <ul id="countrytabs" class="shadetabs"> <li><a href="external1.htm" rel="countrycontainer" class="selected">Tab 1</a></li> <li><a href="external2.htm" rel="countrycontainer" id="favorite">Tab 2</a></li> <li><a href="external3.htm" rel="countrycontainer">Tab 3</a></li> <li><a href="external4.htm" rel="countrycontainer">Tab 4</a></li> </ul>

    M D 2 Replies Last reply
    0
    • V vishnukamath

      hi, i need to put all anchor tags into an array, in java script. <ul id="countrytabs" class="shadetabs"> <li><a href="external1.htm" rel="countrycontainer" class="selected">Tab 1</a></li> <li><a href="external2.htm" rel="countrycontainer" id="favorite">Tab 2</a></li> <li><a href="external3.htm" rel="countrycontainer">Tab 3</a></li> <li><a href="external4.htm" rel="countrycontainer">Tab 4</a></li> </ul>

      M Offline
      M Offline
      Martin Jarvis
      wrote on last edited by
      #2

      Can you use the standard DOM property document.links? http://richardbowles.tripod.com/javascript/section9/lesson9.htm#links[^]


      Freestyle Interactive Ltd | Martin on .Net

      1 Reply Last reply
      0
      • V vishnukamath

        hi, i need to put all anchor tags into an array, in java script. <ul id="countrytabs" class="shadetabs"> <li><a href="external1.htm" rel="countrycontainer" class="selected">Tab 1</a></li> <li><a href="external2.htm" rel="countrycontainer" id="favorite">Tab 2</a></li> <li><a href="external3.htm" rel="countrycontainer">Tab 3</a></li> <li><a href="external4.htm" rel="countrycontainer">Tab 4</a></li> </ul>

        D Offline
        D Offline
        daveyerwin
        wrote on last edited by
        #3

        vishnukamath wrote: i need to put all anchor tags into an array, in java script.

        • Tab 1
        • Tab 2
        • Tab 3
        • Tab 4

        arrayOfAnchorTags = document.getElementsByTagName("A")
        alert(arrayOfAnchorTags[1].id)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups