<html>
<head>
<script type="text/javascript">
function addNewLine()
{
var form=document.getElementById('form2');
var formTemp=document.createElement('form');
form.appendChild(formTemp);
var input=document.createElement('input');
var del=document.createElement('input');
del.type='button';
del.value='delete';
del.onclick=function(){form.removeChild(formTemp)}
formTemp.appendChild(input);
formTemp.appendChild(del);
}
</script>
</head>
<body>
<form id='form1'>
<input type="button" value="addNew" onclick='addNewLine()' />
</form>
<form id='form2'>
</form>
</body>
</html>
http://alzhai.com/post-374.html text input