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 8699049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:51:15+00:00 2026-06-13T01:51:15+00:00

I have a form with 3 input box and all the input box does

  • 0

I have a form with 3 input box and all the input box does not have id, name field in it. So if i enter value in it, How can i check the value of input box without id and name field using javascript

<form id='a' action='' >
    <input type='text' value='' />
    <input type='text' value='' />
</form>

This is the code in html and i want to have the value of input box using javascript. Can i do that?

  • 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-06-13T01:51:16+00:00Added an answer on June 13, 2026 at 1:51 am

    You could get a reference to them and check their value property.

    For the luxury of supporting newer browsers…

    [].forEach.call(document.querySelectorAll("#a input[type='text']"),
                   function(input) {
                       var value = input.value;
                   }); 
    

    If you need to support the annoying browsers that still seem to linger, just write a bit more code and you’re good as gold.

    var inputs = document.getElementById("a").getElementsByTagName("input");
    var i;
    var length;
    var value;
    
    for (i = 0, length = inputs.length; i < length; i++) {
         // Check we have [type='text']
         if (inputs[i].type != "text") {
             continue;
         }
         value = inputs[i].value;
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an HTML form: <form action='process.php' method='post'> <input type='checkbox' name='check_box_1' /> Check me!<br>
I have a form with input field which can be accessed like var algorithm
I have a form with an input box where the user can specify their
i have one form which have some input box and some select box. i
I have a form in a .html files where input/select box looks like this
I have... a dynamic populated select box several input boxes a submit button form
I have a form ,in that there have a text box which can take
I have a form with a text input box which displays similar entries to
I have a pretty simple form. When the user types in an input field,
I have an upload box... <form action=upload_file.php method=post enctype=multipart/form-data><BR> <label for=file>Filename:</label><BR> <input type=file name=file

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.