JSFiddle - React, Tailwind, and code Playground
by shahrukh007
HTML
<html>
<head>
<body>
<input id="input_Text"><br>
<button type="button" onclick="addTodo();">Submit</button><br>
<ul id="list"></ul>
<script>
var todos = [];
function addTodo() {
var inputValue = document.getElementById('input_Text').value;
document.getElementById("input_Text").value = "";
todos.push(inputValue);
for (var i = 0; i < todos.length; i++) {
var input_Value = document.createTextNode(inputValue);
var checkbox = document.createElement('input');
var newList = document.createElement("li");
var editButton=document.createElement("button");
editButton.innerText="Edit";
var deleteButton=document.createElement("button");
deleteButton.innerText="Delete";
newList.appendChild(checkbox);
newList.appendChild(input_Value);
newList.appendChild(editButton);
newList.appendChild(deleteButton);
document.getElementById("list").appendChild(newList);
}
}
</script>
</body>
</head>
</html>