User Tools

Site Tools


web_design:letter:javascript

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
web_design:letter:javascript [2021/10/07 13:14]
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's date and to prompt the user for the name of the recipient. Don't worry if you don't understand it completely. We'll spend more time on Javascript later. On this page, we'll add a very simple script to automatically use today's date and to prompt the user for the name of the recipient. Don't worry if you don't understand it completely. We'll spend more time on Javascript later.
  
-=== 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.
 <code><h1 style="font-family:Arial,sans-serif; color:green; font-size: 1.7em; text-decoration:underline; font-variant: small-caps; line-height: 2em; text-shadow:2px 2px #ff0000;">Job Application</h1> <code><h1 style="font-family:Arial,sans-serif; color:green; font-size: 1.7em; text-decoration:underline; font-variant: small-caps; line-height: 2em; text-shadow:2px 2px #ff0000;">Job Application</h1>
Line 18: Line 17:
 <p>Jane</p></code> <p>Jane</p></code>
  
-== Update Date ==+==== 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 33: Line 32:
   * Note that the 'first' element is labelled '0'. This is common in programming. We'll look at this more later.   * Note that the 'first' element is labelled '0'. This is common in programming. We'll look at this more later.
  
-== Prompt for Addressee ==+==== Prompt for Addressee ====
  
  
Line 49: Line 48:
   document.getElementsByTagName("P")[1].innerHTML =  nombre;   document.getElementsByTagName("P")[1].innerHTML =  nombre;
 }</code> }</code>
 +
 +  * Run it and enter the name of the person next to you.
 +  * See the name on the third line change.
  
 [[web_design:letter:exercise|Next: Ejercicio]] [[web_design:letter:exercise|Next: Ejercicio]]
web_design/letter/javascript.1633637646.txt.gz · Last modified: 2023/08/16 09:33 (external edit)