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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:30:02+00:00 2026-06-02T18:30:02+00:00

Since input tags aren’t supposed to have closing tags, is there a simple way

  • 0

Since input tags aren’t supposed to have closing tags, is there a simple way to extract the text/HTML in between a series of input tags? For example, for the below I want to retrieve <b>Bob and Tim</b><br>Tim <i>after</i> Bob<br>.

<div id="inputs">
    <input type="text" value="bob" size="4" />
    <b>Bob and Tim</b><br>
    <input type="text" value="tim" size="4" />
    Tim <i>after</i> Bob<br>
    <input type="button" value="get textbox values" id="mybutton" />
</div>​

http://jsfiddle.net/gLEZd/5/

I can get the textbox’s values, but how do I accomplish the above?

  • 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-02T18:30:03+00:00Added an answer on June 2, 2026 at 6:30 pm

    already more or less available in the fiddle and stated in the comment. but here also the code for the others directly with a small explanation:

    $("#mybutton").click( function() {
      var tempContainer = $("#inputs").clone();
      tempContainer.find("input").remove();
      alert(tempContainer[0].innerHTML);
    });​
    

    this way the container is cloned and then the inputs get removed from the cloned container… in the end we have an innerHTML without the inputs

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

Sidebar

Related Questions

Since CS3 doesn't have a web service component, as previous versions had, is there
I have a page with many text input's. All input's share the same class
I'm trying to do Ruby password input with the Highline gem and since I
Since Knockout's individual templates are kept in script tags, I thought that I could
I have a form which includes a JQUERY datepicker attatched to an <input> on
I'm validating about 10 input fileds in a form. The ValidationMessageFor-tags should be at
I have an html form and within the form I have a <button> element.
Hi I have the following situation where I have tags wrapped around my contents
I have a label and input outputted from the shopping cart we are using.
I have some strange restrictions on the following problem. (My friends aren't very good

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.