Click here to Skip to main content
15,914,608 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have already add textbox on button click but problem is that when i'm delete button click it delete all textbox but i don't want that it shuold delete one after one
Posted

XML
<html>
<head>
<script language="javascript">
function add()
{
document.getElementById("f1").innerHTML+="<input type='text'>";
}
function del()
{
document.getElementById("f1").innerHTML-="<input type='text'>";


}

</script>

</head>
<body>
<form id="f1">


<input type="button" value="Add" onclick="add()">
<input type="button" value="Delete" onclick="del()">

</form>

</body>
<html>
 
Share this answer
 
Comments
Blesson Mathew 6-Sep-11 9:36am    
Hello garasia. Dnt try to put your question as answer.I think this is a part of your question.
Thaanx
Hi,
Just look in to the below link
Dynamically add and remove text boxes

I hope this may help you.
Thaanx
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900