create textbox dynamically
by Nirmala[ Edit ] 2010-05-05 18:25:54
create textbox dynamically
If you want to create textboxes dynamically just use the below code.
<script type="text/javascript">
function test()
{
var formtag = document.createElement("form");
var txttag=document.createElement("input");
txttag.type="text";
txttag.id="txttag1";
txttag.style.height="20px";
txttag.style.width="150px";
formtag.appendChild(txttag);
document.body.appendChild(formtag);
}
</script>
<input type="button" value="create textbox" onclick="test()">