veera kishore
veera kishore

Reputation: 21

display same table data in multiple times on click of add button using javascript

I am having 3 text boxes in a table if i click add button the same text boxes need to append in the same page using javascript.Please help me

Upvotes: 2

Views: 652

Answers (1)

Anupam
Anupam

Reputation: 8016

Ypur question is not clear but i guess you want something like this

function buttonClick(parent){
var test = document.createElement("input");
test.setAttribute("type", "text");
test.setAttribute("name", "someName");

parent.appendChild(test);
}

call this function on button click event with a parent element as arguement

Upvotes: 1

Related Questions