Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

create input element with js and append

var inputtime = document.createElement("input");
inputtime.setAttribute("type", "datetime");
inputtime.setAttribute("name", "milestones[]");
inputtime.setAttribute("value", "t_id");
inputtime.setAttribute("id", "dt");
inputtime.setAttribute("class", "form-control");
document.getElementById("rows").appendChild(inputtime);
 
PREVIOUS NEXT
Tagged: #create #input #element #js #append
ADD COMMENT
Topic
Name
7+3 =