From 06bd2966ca6ba5c5b8694d28083c069a36457878 Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Fri, 9 Aug 2024 10:23:56 +0200 Subject: [PATCH] dag 3 commit 1 --- JS_frecodecamp/index.htm | 14 ++++++++++++++ JS_frecodecamp/script.js | 1 + JS_frecodecamp/variables.js | 6 ++++++ intro html/index.html | 3 ++- intro html/js.html | 32 ++++++++++++++++++++++++++++++++ intro html/script.js | 3 +++ 6 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 JS_frecodecamp/variables.js create mode 100644 intro html/js.html create mode 100644 intro html/script.js diff --git a/JS_frecodecamp/index.htm b/JS_frecodecamp/index.htm index e69de29..aca0019 100644 --- a/JS_frecodecamp/index.htm +++ b/JS_frecodecamp/index.htm @@ -0,0 +1,14 @@ + + + + + + Document + + + + + + + + \ No newline at end of file diff --git a/JS_frecodecamp/script.js b/JS_frecodecamp/script.js index e69de29..592f786 100644 --- a/JS_frecodecamp/script.js +++ b/JS_frecodecamp/script.js @@ -0,0 +1 @@ +console.log("Hello world"); \ No newline at end of file diff --git a/JS_frecodecamp/variables.js b/JS_frecodecamp/variables.js new file mode 100644 index 0000000..e43a4b2 --- /dev/null +++ b/JS_frecodecamp/variables.js @@ -0,0 +1,6 @@ +let firstName, lastName; +firstName = 'Geir'; +lastName = 'Jerstad'; +console.log(firstName, lastName); +const JUL_2024 = '24.12.2024'; +console.log(JUL_2024); \ No newline at end of file diff --git a/intro html/index.html b/intro html/index.html index 4e1c269..1020e22 100644 --- a/intro html/index.html +++ b/intro html/index.html @@ -15,7 +15,8 @@

Eksempel 1

- +
Start Tekst Her
+
diff --git a/intro html/js.html b/intro html/js.html new file mode 100644 index 0000000..3aa17eb --- /dev/null +++ b/intro html/js.html @@ -0,0 +1,32 @@ + + + + + + + Document + + + +

Introduksjon til JavaScript

+
    +
  1. Finne frem til en tagg
  2. +
  3. Endre HTML
  4. +
  5. Trekke ut som funksjon
  6. +
  7. kalle andre funksjoner
  8. +
+

Så bruker vi JavaScript til dette

+
    +
  1. Åpne og Lukke
  2. +
  3. Velge hode
  4. +
+
(tom)
+ + + + + \ No newline at end of file diff --git a/intro html/script.js b/intro html/script.js new file mode 100644 index 0000000..a937d49 --- /dev/null +++ b/intro html/script.js @@ -0,0 +1,3 @@ +function oppdaterTekst() { + document.getElementById('tekstDiv').innerHTML = 'Ny tekst nå som knappen er trykket på'; +} \ No newline at end of file