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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:07:16+00:00 2026-06-08T18:07:16+00:00

I have a website with a form. The form is filled by user with

  • 0

I have a website with a form. The form is filled by user with data for example i show to user:

 <input type='text' value="" name="dsa" />

And he fills it with value of “3”;

And he clicks button “save”. Now i want to have the whole HTML of the website including values of fields. So i use:

document.documentElement.innerHTML

But i get:

 <input type='text' value="" name="dsa" />

But i want to get this:

 <input type='text' value="3" name="dsa" />

NOTICE I want to take the whole HTML of the website, not only one field. I dont know what fields will be on the website so i need a general solution.

  • 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-08T18:07:18+00:00Added an answer on June 8, 2026 at 6:07 pm

    AFAIK you can’t get this from the HTML code, as the HTML code does not change when the user inputs something in a Input text field.

    What you could do is get all input fields on the page and get their values with something like this:

    var inputs, index;
    
    inputs = document.getElementsByTagName('input');
    for (index = 0; index < inputs.length; ++index) {
        // deal with inputs[index] element.
    }
    

    The code is from this post: https://stackoverflow.com/a/2214077/312312
    I was too lazy to write it down my self 😛

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

Sidebar

Related Questions

I have a form on my website that takes input from a text area
I have this website (C#/ASP.NET) with a form where the user can register for
I have a form where depending on the website's brand one of two input
I have a field that a user can input first and last name to
I have a contact form on a website (a general form: name , email
So I have a form on my website that will submit a name and
I have a website form that requires a US phone number input for follow
I have an order form where a user gives some input about a product
I have a website form that collects url of users to store in a
I have website based on Umbraco 5. I have installed contact form plugin (http://cultivjupitercontact.codeplex.com/).

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.