开发者

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

开发者 https://www.devze.com 2023-02-20 17:21 出处:网络
I am having 3 text boxes in a table if i cli开发者_如何学Cck add button the same text boxes need to append in the same page using javascript.Please help meYpur question is not clear but i guess you wa

I am having 3 text boxes in a table if i cli开发者_如何学Cck add button the same text boxes need to append in the same page using javascript.Please help me


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

0

精彩评论

暂无评论...
验证码 换一张
取 消