multiple textbox if click the button database based
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>Add input</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
function addInput(f) {
var aInputs=f.getElementsByTagName('input');
for(var i=0; i<aInputs.length; i++) {
if(aInputs[i].className=='hide') {
aInputs[i].className='';
break;
}
}
}
</script>
<style type="text/css">
input {display:block;}
.hide {display:none;}
</style>
</head>
<body>
<form action="#" name="form1">
<div>
<input type="text" name="txt1">
<input class="hide" type="text" name="product1">
<input class="hide" type="text" name="product2">
<input class="hide" type="text" name="product3">
<input class="hide" type="text" name="product4">
<button type="button" onclick="addInput(this.form);">plus</button>
</div>
</form>
</body>
</html>
demo:
Add input