Update task List
This commit is contained in:
@@ -4,10 +4,10 @@
|
|||||||
<title>JavaScript</title>
|
<title>JavaScript</title>
|
||||||
<style>
|
<style>
|
||||||
.ready {
|
.ready {
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
color: red;
|
color: red;
|
||||||
text-decoration: line-through;
|
text-decoration: line-through ;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
}
|
}
|
||||||
function saveTasks() {
|
function saveTasks() {
|
||||||
localStorage.setItem('tasklist', JSON.stringify(tasks));
|
localStorage.setItem('tasklist', JSON.stringify(tasks));
|
||||||
|
|
||||||
}
|
}
|
||||||
function buildTasks() {
|
function buildTasks() {
|
||||||
tasks.length = 0;
|
tasks.length = 0;
|
||||||
@@ -70,6 +71,7 @@
|
|||||||
};
|
};
|
||||||
tasks.push(myObj);
|
tasks.push(myObj);
|
||||||
saveTasks();
|
saveTasks();
|
||||||
|
buildTasks();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user