user control using javascript
<p>I want to make a kind of user control using javascript.</p>

<pre><code>&lt;div id="myDiv"&gt;
  &lt;input type="text" id="myText" /&gt;
&lt;/div&gt;
</code></pre>

<p>I want to insert this div in my HTML markup, wherever I required. Purpose is to make it reusable at various places in my HTML and maintain a single point of change, if I need to change the control in future. I would like to have a javascript function for it. I need best possible ways to do it maybe using jquery.</p>
