function generate(){
var data = document.getElementById('inputText').value;
append(data);
}
function append(data){
var newP = document.createElement("p");
var mytext = document.createTextNode(data);
newP.appendChild(mytext)
document.getElementById("mydiv").appendChild(newP);
}
No comments:
Post a Comment