Get the HTML that makes up an element in Jquery or Javascript?
<p>How do I get the HTML that makes up an element using Jquery or Javascript?
For example if I have an element that looks like </p>

<pre><code>&lt;div id="theDivIWant" class="aClassName" style="somestyle: "here"&gt;&lt;/div&gt;
</code></pre>

<p>I can grab a reference to it using </p>

<p>var x = document.getElementById("theDivIWant")
or $("#theDivIWant")</p>

<p>but how can I actually retrieve the string?</p>

<pre><code>"&lt;div id="theDivIWant" class="aClassName" style="somestyle: "here"&gt;&lt;/div&gt;"
</code></pre>
