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

  • Home
  • SEARCH
  • 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 7185933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:31:31+00:00 2026-05-28T18:31:31+00:00

document.getElementById(test).value document.getElementById(test).innerHTML Does the first mean the address and the second mean the value

  • 0
document.getElementById("test").value

document.getElementById("test").innerHTML

Does the first mean the address and the second mean the value stored at the address? Also, where can I find documentation on the value property?

  • 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-28T18:31:32+00:00Added an answer on May 28, 2026 at 6:31 pm

    .value gives you the currently-set value of a form element (input, select, textarea), whereas .innerHTML builds an HTML string based on the DOM nodes the element contains.

    For a simple example, go to the JS Fiddle demo, and enter a new value into the input and then move out of the input.

    The test uses the following JavaScript:

    document.getElementById('input').onchange = function(){
        alert('innerHTML: ' + document.getElementById('input').innerHTML + '; whereas value: ' + document.getElementById('input').value);
    };
    

    (The above text updated, following a comment left by am not i am, in comments below.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a return from a request set like: if (ajaxRequest.responseText==234) { document.getElementById('testi').innerHTML=<br>test <a
function check(id){ var _id = document.getElementById(id); url = test.php?check=1&id= + _id; } i want
I put this on the head section var d = parseInt(document.getElementById('test').style.width); alert(d); But the
document.getelementbyid('txtbox') is not working when I used in content page as it is working
document.getElementById('container').addEventListener('copy',beforecopy,false ); In Chrome / Safari, the above will run the "beforecopy" function when
This works : alert(document.getElementById(Container).nodeName); But this doesnt : var CurParent = document.getElementById(Container); alert(CurParent.nodeName); I
Is there a function like document.getElementById(FirstDiv).clear() ?
I have encountered odd behavior when using document.getElementById tonight. Duplicated in Firefox 3 and
As far as I know document.getElementById('myId') will only look for HTML elements that are
A regular dom element is such as: document.getElementById('a') or document.createElement('div') But jQuery returns elements

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.