This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
web_design:letter:javascript [2021/10/06 10:10] mag [Javascript] |
web_design:letter:javascript [2023/08/16 09:33] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Web Development | + | ====== Web Development Lesson 2 - Letter |
- | ===== Lesson 2 - Letter ===== | + | ===== Javascript |
- | ==== Javascript ==== | + | ==== Objective |
- | === Objective === | + | |
On this page, we'll add a very simple script to automatically use today' | On this page, we'll add a very simple script to automatically use today' | ||
- | === Content | + | ==== Setup ==== |
We'll continue using the work you've done in jsfiddle throughout this lesson. In case you need it, the code is below. | We'll continue using the work you've done in jsfiddle throughout this lesson. In case you need it, the code is below. | ||
< | < | ||
Line 17: | Line 16: | ||
< | < | ||
< | < | ||
+ | |||
+ | ==== Update Date ==== | ||
* Paste the code below into the Javascript section (bottom left) of your jsfiddle page. | * Paste the code below into the Javascript section (bottom left) of your jsfiddle page. | ||
Line 30: | Line 31: | ||
* < | * < | ||
* Note that the ' | * Note that the ' | ||
+ | |||
+ | ==== Prompt for Addressee ==== | ||
+ | |||
* Now we'll add another short piece of code within the curly brackets, but after the data functions. | * Now we'll add another short piece of code within the curly brackets, but after the data functions. | ||
Line 44: | Line 48: | ||
document.getElementsByTagName(" | document.getElementsByTagName(" | ||
}</ | }</ | ||
+ | |||
+ | * Run it and enter the name of the person next to you. | ||
+ | * See the name on the third line change. | ||
[[web_design: | [[web_design: |