Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

to do list in javascript append appendchild input value

var taskInput = document.getElementById('newTask');
var addTaskButton = document.getElementById('addTaskButton');
var incompleteTasks = document.getElementById('toDo');
var completedTask = document.getElementById('completedTasks');

var addTask = function () {
    var text = taskInput.value;
    var li = '<li>' + text + '<li>';
    incompleteTasks.appendChild(li);

}

addTaskButton.onclick = addTask;
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript optional add object key 
Javascript :: how to make first letter uppercase in javascript 
Javascript :: sweetalert question 
Javascript :: javascript objectentries 
Javascript :: axios all methods 
Javascript :: jquery add br in text 
Javascript :: socket.io cdn 
Javascript :: circular queue implementation using js 
Javascript :: get filenem js 
Javascript :: jquery carousel slide event 
Javascript :: javascript sleep 3 second 
Javascript :: javascript filter array by groups of highest 
Javascript :: javascript jquery map a range of numbers 
Javascript :: ip address validation regex angular 
Javascript :: react convert excel to json 
Javascript :: react button onclick components 
Javascript :: how to get every index of array in javascript 
Javascript :: simple id using javascrip math randomt 
Javascript :: how to toggle fa fa-caret-down and fa fa-caret-up using jquery 
Javascript :: javascript map to object 
Javascript :: anguler test submit form 
Javascript :: npm hook form 
Javascript :: jquery date format 
Javascript :: multiple checkbox react 
Javascript :: Laravel JSON Where Query 
Javascript :: setinterval vs settimeout 
Javascript :: how to get data-target value in jquery 
Javascript :: get all parent nodes of child in javascript array 
Javascript :: mongodb mongoose update convert string to object 
Javascript :: vuejs reset component 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =