started mvc chapter

This commit is contained in:
Geir Okkenhaug Jerstad 2024-08-26 13:59:21 +02:00
parent 604e8181c6
commit a759fef088
4 changed files with 54 additions and 0 deletions

42
MVC/intro.html Normal file
View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Intro</title>
</head>
<body>
<div class="group">
<div>Hei jeg heter</div>
<div id="namediv">...her kommer et navn</div>
</div>
<div class="group">
<div>Jeg bor i</div>
<div id="placediv">..her kommer et sted</div>
</div>
<div class="group">
<div>Min favorittmat er</div>
<div id="fooddiv">...her kommer en matrett</div>
</div>
<button onclick="setFields()">Klikk her for å sett inn verdier</button>
<script>
let name;
let place;
let food;
function setFields(){
document.getElementById("namediv").innerHTML = "Geir";
document.getElementById("placediv").innerHTML = "Kristiansand";
document.getElementById("fooddiv").innerHTML = "Pizza";
}
</script>
<style>
.group{
display: flex;
}
</style>
</body>
</html>

View file

View file

@ -0,0 +1,12 @@
<!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>
Thus spake the Master Programmer:
"After three days without programming, life becomes meaningless."
</body>
</html>

View file