visuell-teller
This commit is contained in:
parent
83f69d397d
commit
859f8334d9
12 changed files with 140 additions and 74 deletions
26
oppgaver/uke1/visuell-teller.html
Normal file
26
oppgaver/uke1/visuell-teller.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<button onclick="countUp()">tell oppover</button>
|
||||
<button onclick="conutDown()">tell nedover</button>
|
||||
<div id="tall">0</div>
|
||||
|
||||
<script>
|
||||
let count = 0;
|
||||
function countUp() {
|
||||
++count;
|
||||
document.getElementById('tall').innerHTML = count;
|
||||
}
|
||||
function conutDown(){
|
||||
--count;
|
||||
document.getElementById('tall').innerHTML = count;
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue