-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
47 lines (47 loc) · 1.1 KB
/
Copy pathindex.html
File metadata and controls
47 lines (47 loc) · 1.1 KB
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
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.js"></script>
<link rel="stylesheet" type="text/css" href="w3.css">
</head>
<body>
<div>
<input type="button" value="Przycisk zmiany koloru tła na zielony" onclick="kolor('green');">
<input type="button" value="Przycisk zmiany koloru tła na biały" onclick="kolor('white');">
</div>
<div id="main">
<h1><span v-on:click="seenMenu = !seenMenu">{{ title }}</span></h1>
<ul id="example-1">
<li v-for="item in items" v-on:click="seen = !seen" v-if="seenMenu"> {{ item }} </li>
</ul>
<span v-if="seen">some content</span>
</div>
</body>
<script>
function kolor(kolor)
{
document.bgColor=kolor;
}
document.addEventListener("DOMContentLoaded",
()=> {
var app = new Vue({
el: '#main',
data: {
title: 'Tytuł',
items: [
"raz",
"dwa",
"trzy"
],
page: [
"1",
"2",
"3"
],
seen: false,
seenMenu: false
}
})
}
)
</script>
</html>