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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:42:27+00:00 2026-05-26T16:42:27+00:00

I am trying to parse some elements of a form. I have with me

  • 0

I am trying to parse some elements of a form.

I have with me the form ID/form name.

Now I want to parse through all radio buttons with name= “radio123″(or id=”radio123”).
But when I try $(this).html on each element (of a radio button)… then I get a blank value…

How do I access the HTML code for all radiobuttons/checkboxes within a form?

  • 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-26T16:42:28+00:00Added an answer on May 26, 2026 at 4:42 pm

    This is the normal behavior for jQuery.fn.html function: This method uses the browser's innerHTML property. Look at the examples if you don’t understand what I mean.

    I don’t know why you want to get the HTML (if you want the value, look at the jQuery.fn.val method), but here’s a solution

    $("input:radio").each(function () {
       console.log( this.outerHTML );
    });
    

    Be careful with the outerHTML, as it is not supported across all browsers you could use this function:

    function getOuterHTML( node ) {
        var parent = node.parentNode,
            el = document.createElement( parent.tagName ),
            shtml;
    
        el.appendChild( node );
        shtml = el.innerHTML;
        parent.appendChild( node );
    
        return shtml;
    }
    // use it like getOuterHTML( this ) in the preceding each loop
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to parse through all elements in a single radio button (or
I have a class that generates some html (form elements and table elements), but
Trying to parse an HTML document and extract some elements (any links to text
Trying to parse some XML but apparently this is too much for a lazy
I am trying to parse some XML i have retrieved via e4x in an
I have some HTML I am trying to parse. There are cases where the
I'm trying to parse an mrss feed using jquery but am having some difficulty
I trying to parse some xml in Google Refine using Jython and ElementTree but
I'm trying to parse some JSON using the JSon.Net library. The documentation seems a
So I'm trying to parse some XML, the creation of which is not under

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.