boat

Javascript

interactive web design

document.getElementById("welcome").innerHTML

In this unit we will learn how to get data using prompt() onto the webpage, not just into the console.

Task 1

Download this web document and save it in a project folder.

Open it in a browser and a text editor, eg Sublime Text.

Follow the video and do what the video does.

TASK 2

Download image and save it in your project folder.

Using your HTML skills, display the image on the webpage.

TASK 3

Open the Worksheet and follow the instructions:

TASK 4 - Tricky!

Finally, the webpage asks the user for their age.

If the user is younger than 18, the webpage displays a message saying "You should visit Tokyo Disney Land!"

Otherwise the webpage displays a message "How about shopping in Ginza?"

SUBMISSION

Submit your web document (html file) as instructed by your tutor.


Tags

browser png or jpg? tags body save querySelector html h4 id structure refresh #name innerHTML