Skip to content

Commit e2e9a41

Browse files
committed
04
1 parent d30c3fe commit e2e9a41

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

index.html

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,27 @@
99
</head>
1010
<body>
1111
<div id="app">
12-
{{ nextYear('안녕') }}
13-
<input :type="type" :value="inputData">
14-
<a :href="getKossieCoderLink('kossiecoder')">코지 코더 채널</a>
12+
<form v-on:submit.prevent="submit">
13+
<input type="text"><br>
14+
<button type="submit">Submit</button>
15+
</form>
1516
</div>
1617
<script>
1718
new Vue({
1819
el: '#app',
1920
data: {
20-
person: {
21-
name: '코지 코더',
22-
age: 34
23-
},
24-
inputData: 'hello',
25-
type: 'text',
26-
link: 'https://www.youtube.com/'
21+
year: 2018
2722
},
2823
methods: {
29-
getKossieCoderLink(channel) {
30-
return this.link + channel;
24+
plus() {
25+
this.year++;
3126
},
32-
nextYear(greeting) {
33-
return greeting + '! ' +this.person.name + ' 는 내년에 ' + (this.person.age + 1) + '살 입니다';
27+
minus() {
28+
this.year--;
3429
},
35-
otherMethod: function() {
36-
this.nextYear();
30+
submit() {
31+
alert('submitted');
32+
console.log('hello');
3733
}
3834
}
3935
})

0 commit comments

Comments
 (0)