A basic example to keep you going:
Code:
<script type="text/javascript">
function Add(targ,elm,separate)
/* Accepts three parameters: The target element (targ), the element you wish to create (elm)
and the element you wish to separate the textbox (separate)
*/
{
document.getElementById(targ).appendChild(document.createElement(separate));
document.getElementById(targ).appendChild(document.createElement(elm));
}
</script>
<p id="tst">
<input type="button" value="Add Textbox" onclick="Add('tst','input','br');">
</p>
Bookmarks