-
Notifications
You must be signed in to change notification settings - Fork 0
/
first try cdn.html
85 lines (77 loc) · 1.95 KB
/
first try cdn.html
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js"></script>
</head>
<body>
<div id="app">{{greetings}}</div>
<div id="app-2">
<span v-bind:title="message"> Hover your mouse over me for a few seconds to see my dynamically bound title! </span>
<p><a :href="url">Google Home Page</a></p>
</div>
<div id="app-3">
<p v-if="display">I am visible, Yay!</p>
</div>
<div id="app-4">
<ol>
<li v-for="todo in todos">{{ todo.dish }} <span v-if="todo.dish === favorite"> is my Favorite</span></li>
</ol>
</div>
<div id="app-5">
<button v-on:click="count">You clicked {{counter}} times</button>
</div>
<div id="app-6">
<p>{{message}}</p>
<textarea v-model="message"></textarea>
</div>
</body>
<script>
let app = new Vue({
el: '#app',
data: {
greetings: 'hello world',
},
});
let app2 = new Vue({
el: '#app-2',
data: {
message: 'You loaded this page on ' + new Date().toLocaleString(),
url: 'https://google.com',
},
});
let app3 = new Vue({
el: '#app-3',
data: {
display: true,
},
});
let app4 = new Vue({
el: '#app-4',
data: {
todos: [{ dish: 'Pizza' }, { dish: 'Samosa' }, { dish: 'Fried Rice' }, { dish: 'Burger' }, { dish: 'Pasta' }],
favorite: 'Pasta',
},
});
let app5 = new Vue({
el: '#app-5',
data: {
counter: 0,
},
methods: {
count: function () {
this.counter += 1;
},
},
});
let app6 = new Vue({
el: '#app-6',
data: {
message: 'Type something here',
},
});
</script>
</html>