Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6765839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:45:35+00:00 2026-05-26T14:45:35+00:00

<div class="menu_item_variant" id="date" onmouseover="mouseIn(this.id)" onmouseout="mouseOut(this.id)"> <a href="dating-advice.html">Dating Coaching &amp; Advice</a> </div> hi, could some

  • 0
<div class="menu_item_variant" id="date" onmouseover="mouseIn(this.id)" onmouseout="mouseOut(this.id)">
  <a href="dating-advice.html">Dating Coaching &amp; Advice</a>
</div>

hi, could some one help me get the value of href using document.getElementById("date") etc. thanks ! Andy.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:45:36+00:00Added an answer on May 26, 2026 at 2:45 pm

    You can get the “date” element and then loop through its children:

    var elm, href;
    elm = document.getElementById("date");
    for (elm = elm.firstChild; elm; elm = elm.nextSibling) {
        if (elm.nodeName === "A") {
            href = elm.href;
            break;
        }
    }
    

    Or actually, I think just about every browser has getElementsByTagName now, so:

    var list, href;
    list = document.getElementById('date').getElementsByTagName('a');
    if (list.length > 0) {
        href = list[0].href;
    }
    

    More to explore:

    • DOM2 standard (nearly universally supported)
    • DOM2 HTML (widely supported)
    • DOM3 standard (reasonably supported, but gaps in older browsers, particularly IE)
    • HTML5 DOM interfaces (reasonably supported, as they mostly document DOM2 HTML and things browsers vendors were doing — but test for gotchas)
    • caniuse.com and quirksmode.org — handy places for checking which browsers support what technologies
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a HTML document like below: <td> <div class="commentLink"> <a href="javascript:ShowBox()">Show</a> </div> <div
Here's a snippet of my code: <div class="myclass" id="demo" style="display:none;">Hello.</div> <a href="#" onclick="$('.myclass').fade({ duration:
i have this elements <div class="a b"></div> <div class="b"></div> <div class="a"></div> I want apply
From the haskell report: The quot, rem, div, and mod class methods satisfy these
'<div id="'+div_id+'" class="widget" style="height:60px;width:110px">\n\ <div class="widget-head ui-widget-header" style="cursor:move;height:20px;width:130px">'+ '<span id="'+span_id+'" style="float:right; cursor:pointer" class="dialog_link ui-icon
<div> <div class="left"> <div align="center" class="node"> <div class="nodeText"> <h2 >test</h2> </div> <div class="node"> <h2>test</h2>
Let's say I do something stupid like this: <div class=my_class>fun wee!!</div> <span class=my_class><b class=my_class>Title</b></span>
$('div.box').html(hello) puts the word hello inside all my div's of class 'box'. They all
This is my index.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <html> <head><title>Untitled Document</title>
Type class Integral has two operations quot and div , yet in the Haskell

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.