Dynamic create text boxes using Javascript

Dynamically create HTML textboxes, listboxes using Javascript without refreshing the page?
<html>
<head>
<title>Dynamic Form</title>
<script language="javascript">
function changeIt()
{
var i = 1;
my_div.innerHTML = my_div.innerHTML +"<br><input type='text' name='mytext'+ i>"

}
</script>
</head>
<body>

<form name="form" action="post" method="">
<input type="text" name=t1>
<input type="button" value="test" onClick="changeIt()">
<div id="my_div"></div>

</body>

Example




asp javascript dynamic forms forms create text boxes


Back To Top
© 1998 - 2024 psacake.com
Version 7.21 | Advertise on this site