-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsession3.html
More file actions
29 lines (27 loc) · 866 Bytes
/
session3.html
File metadata and controls
29 lines (27 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Hello, world!</title>
<link rel="stylesheet" href="session.3.css">
</head>
<body>
<div id ="app">
<h2>todo list</h2>
<form v-on:submit.prevent>
<input type="text" v-model="newItem">
<button v-on:click="addItem">ADD</button>
</form>
<ul>
<li v-for="(todo, index) in todos">
<input type="checkbox" v-model="todo.isDone">
<span v-bind:class="{ done: todo.isDone }">{{ todo.item }}</span>
<button v-on:click="deleteItem(index)">Delete</button>
</li>
</ul>
<!-- <pre>{{ $data }}</pre> -->
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script type="text/javascript" src="session3.js"></script>
</body>
</html>