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

  1. Write an HTML page that contains a JavaScript alert to say:   Thanks for visiting my page

  2. 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.)

  3. 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:

    1. Do not use an alert box for this exercise.
    2. The message should be displayed as a header on the Web page, using <h2> and </h2>
    3. The day of the week should be displayed in italics.
    4. Remember that the message displayed by the instruction document.write can include text and HTML tags.
You may want to refer to these examples: