mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
up to step 4
This commit is contained in:
@@ -38,6 +38,10 @@
|
||||
</body>
|
||||
|
||||
<script type="text/javascript">
|
||||
function clearInput(selector) {
|
||||
document.querySelector(selector).value = '';
|
||||
}
|
||||
|
||||
function getTodoText() {
|
||||
return document.querySelector('.textfield').value;
|
||||
}
|
||||
@@ -48,7 +52,7 @@
|
||||
newTodo.querySelector('.title').innerText = getTodoText();
|
||||
todo.parentElement.insertBefore(newTodo, todo);
|
||||
|
||||
// clearInput();
|
||||
clearInput('.textfield');
|
||||
// updateRemaining();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user