Assignment 2
1. Here are the
steps to writing your first JavaScript program.
- Set up your desktop.
- Leave this browser
window open so you can see the instructions.
- Open a second
browser window so you can view your web page document
- Get in Cloud9.
- Open your newAssign.htm document to use as a
basic web page by following these simple steps. Save it as 2hello.htm in
your folder.
- Add the lines of JavaScript to display
"Hello World".
- First add the
<SCRIPT> tags you need in the body of the web page. Look back if you need to.
- Use the document.write() method to display the message "Hello
World" AND use an alert box the display a "Hello World"
alert box.
- Check by opening the file "2hello.htm"
in your browser and HOPE it works. If not, study any parts that look wrong
and try to fix it so it works right. Don't try to add too much fancy stuff
for this program, since we will get to learn more features as we go. If
you are really stuck about how to make it work, click on this link, but not
until you have REALLY tried. Don't click here until
you have tried it for yourself.
Return to Top of Page | Back to Main Menu