CS 312 - Internet Concepts
Fall 2011: Tues/Thurs 3-4:15pm, Dragas 1117 |
Staff
|
JavaScript Lab DayNovember 1, 2011 SetupIf you didn't do this last week: Create a new directory ~/public_html/cs312/labs for your lab exercises and set the permissions so that it the web server (anyone) can access it (chmod 755 ~/public_html/cs312/labs ).
Create a webpage named For the HTML file, make sure that you load the external JavaScript file in the head section. SubmissionAs you complete each lab exercise, let me know and I'll come check it out. Debugging
Lab Exercises1) Event Handlersa) Create a JavaScript function named b) Create a button that calls the JavaScript function c) Create a block of text (can be in a div, p, header, ...) that calls the JavaScript function 2) Form Access and Dynamic PagesCreate a form that asks the user to enter their name, age, and hometown. When the user presses the Submit button, call a JavaScript function. The JavaScript function should perform the following actions:
3) Rollover ImageUse JavaScript to create a rollover image. Choose two images with the same size. Display one image. When the mouse passes over the image, change it to the second image. When the mouse leaves the image, change back to the original image. If you can't find two images that you like, you can use these: |