STAR Early College High School @ Erasmus
Internet Seminar: Creating Interactive Web Pages
Week 3 : JavaScript - Part I
Project: Use alert and prompt to write interactive scripts
-
Write an HTML page that contains a JavaScript alert to say:
Thanks for visiting my page
-
Write an HTML page that displays a prompt asking
What is your favorite sport?
and then responds with
Baseball is my favorite sport too
(Baseball should be replaced with whatever the
user happened to type in.)
-
Write an HTML page that displays a prompt to ask
What day is it today?
and then displays a Web page that says
Today is Tuesday. Have a nice day!
(Tuesday would be replaced with whatever the
user happened to type in.)
NOTE:
-
Do not use an alert box for this exercise.
- The message should be displayed as a header on the Web page, using
<h2> and </h2>
- The day of the week should be displayed in italics.
- Remember that the message displayed by the instruction
document.write can include text and HTML tags.
You may want to refer to these examples: