<HTML> <!-- This is 75701htm.htm -- the source listing for 75701.htm --> This JavaScript displays famous and innocuous "Hello, World." message 3 times. Students modify, screen capture, and put it in assignment book. <H4> Hello, World! </H4> <!-- JAVASCRIPT 01 WEEK 1 PROF. AUCIELLO --> <HEAD> <TITLE>757-01 by YVETTE HANNAH -- TITLE BAR</TITLE> <SCRIPT LANGUAGE="JavaScript"> // begins JavaScript function hw02() { // note balanced braces. msg="Hello Brave New World -- Yvette here.. "; for (i=0; i<3; i++) // basic loop structure. { confirm("Confirm message " + msg + "Number of Times "+ i); } alert("done. 0 to 2 equals 3 times. right?"); } // does 'alert' require a response? // what does 'confirm' do? </SCRIPT> </HEAD> <BODY BGCOLOR=yellow text= blue onLoad="hw02()"> <!-- 'onLoad' calls function after Window is loaded. --> </BODY> <pre> STUDENT NAME: Yvette Hannah CLASS: JAVA -- PROF AUCIELLO COMMENTS: Copy this to the clipboard. (scroll down) Paste to Word and Print it. <A HREF="75701htm.htm"> Source Listing </A> VALID COLOR NAMES FOR BACKGROUND AND TEXT (FOREGROUND) ARE: RED BLUE GREEN YELLOW BLACK CYAN DARKGREY GRAY LIGHTGRAY MAGENTA ORANGE PINK WHITE ACTIVITIES: [Answer these questions for 100 points, include with pasting of screen, put in HW Book. Write answers on this page.] . FIND COLORS THAT WORK FOR YOU. CHANGE BACKGROUND AND FOREGROUND COLORS. . find a list of all colors. . research using RGB (HEX) VALUES ("FFFF") . How to make a comment in HTML . Where does "TITLE" display? . What is the difference between "confirm" and "alert"? (Find answer from book or by "discovery" or both. Learn to use both methods.) . Note syntax of "for" statement. Change loop counter to another number. . What is the value of 'i' when alert is activated? . What event starts function hw02? . Experiment with H1, H2, H3 tags to learn. . Note catenation operator (+) that allows constants (like Hello World) to be displayed next to variables (like i) which is a loop counter. . look up 'catenation' . What does 'pre' do? </pre> </html>