MVC skjemaer
35
MVC/skjemaer.html
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>MVC Skjemaer</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
// model
|
||||||
|
let message = null;// = 'Alt gikk bra';
|
||||||
|
|
||||||
|
// view
|
||||||
|
updateView()
|
||||||
|
function updateView(){
|
||||||
|
if (message == null){
|
||||||
|
|
||||||
|
} else {
|
||||||
|
document.getElementById('app').innerHTML = /*HTML*/ `
|
||||||
|
<h1>Min app</h1>
|
||||||
|
${message}
|
||||||
|
<button>Vis sukksess</button>
|
||||||
|
<button>Vis advarsel</button>
|
||||||
|
<button></button>
|
||||||
|
<button>1</button>
|
||||||
|
`;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// controller
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |