CIT 597 Quiz 2: Forms and Basic JavaScript
Fall 2008, David Matuszek Name_________________________________________
  1. (10 points) In X/HTML forms, how do you indicate that two or more radio buttons belong to the same group?



  2. (10 points) In X/HTML, clicking the text next to a radio button does not click the radio button. How do you correct this?



  3. (30 points) What are the three places that JavaScript code can be put?






  4. (20 points) In JavaScript, the scope of a variable is determined by both where you declare it, and how you declare it.
    1. Tell all the ways that you could declare a variable so that it has global scope.




    2. Tell all the ways you can declare a variable so that it has local scope.




  5. (10 points) Write JavaScript to create an object auto with a field type whose value is "Prius" and a year field whose value is 2005.



  6. (10 points) Write JavaScript to print out (using the document.write() method) all the information about the object auto. Do not assume it has only the two fields defined in the previous question.




  7. (10 points) What is the difference between the two operators == and ===? (Be sure to tell which is which.)