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>
I can get the textbox’s values, but how do I accomplish the above?
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:
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