Skip to content
Snippets Groups Projects
Commit 26845884 authored by dseben's avatar dseben
Browse files

first commit

parent fafd7a52
No related branches found
No related tags found
No related merge requests found
<!DOCTYPE html>
<html lang="hu">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="style.css" />
<title>Schdesign Todo</title>
</head>
<body>
<h1>My first todo project</h1>
<input type="text" id="task-input" />
<button id="add-task">Click me!</button>
<div id="todo-list">
<ul id="tasks">
<li class="task">
<input type="checkbox" id="task0" />
<label for="task0">1. tennivaló</label>
<button>X</button>
</li>
<li>2. tennivaló</li>
</ul>
</div>
<script src="script.js"></script>
</body>
</html>
Font-awesome
#DDD
placeholder (input type = "text"-re)
///////
To look up later:
• position:relative; position:absolute;
addBttn = document.getElementById("add-task");
addBttn.onclick = addTask;
function addTask() {
inputValue = document.getElementById("task-input").value;
taskList = document.getElementById("tasks");
taskLi = document.createElement("li");
taskLi.setAttribute("class", "task");
taskLi.innerText = inputValue;
taskList.appendChild(taskLi);
}
#tasks {
color: red;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment