[an error occurred while processing this directive] File: index.shtml Creator: George Ferguson Created: Tue Nov 13 19:31:40 2012 Time-stamp: [an error occurred while processing this directive] File: templates/doc-start.shtml Creator: George Ferguson Created: Tue Dec 6 12:31:29 2011 Time-stamp: [an error occurred while processing this directive] File: site-settings.shtml Creator: George Ferguson Created: Tue Dec 6 13:49:49 2011 Time-stamp: Site (or subsite)-wide settings. [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] File: head.shtml Creator: George Ferguson Created: Tue Dec 6 12:34:15 2011 Time-stamp: SSI variables for this template: head_title if given, else ``sitename | title'' [an error occurred while processing this directive] File: head-title.shtml Creator: George Ferguson Created: Tue Dec 6 14:29:52 2011 Time-stamp: SSI variables for this template: head_title: complete content of title element if given site_title trailing part of title (if given) section_title middle part of title (if given) page_title leading part of title (if given) title title shown on page, also used as leading part of title (if given) [an error occurred while processing this directive] (none) [an error occurred while processing this directive] File: head-meta.shtml Creator: George Ferguson Created: Tue Dec 6 14:29:18 2011 Time-stamp: SSI variables for this template: meta_description meta_keywords meta_generator [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] File: head-stylesheets.shtml Creator: George Ferguson Created: Tue Dec 6 14:22:58 2011 Time-stamp: SSI variables for this template: site_stylesheet, page_stylesheet stylesheet0, stylesheet1, ...: URL for stylesheets [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] File: head-scripts.shtml Creator: George Ferguson Created: Tue Dec 6 14:23:19 2011 Time-stamp: SSI variables for this template: site_script, page_script script0, script1, ...: URLs of javascript scripts [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] File: body-start.shtml Creator: George Ferguson Created: Tue Dec 6 13:20:46 2011 Time-stamp: SSI variables for this template: body_class page_class page_id [an error occurred while processing this directive] [an error occurred while processing this directive] File: body-header.shtml Creator: George Ferguson Created: Tue Dec 6 13:46:12 2011 Time-stamp: Content above banner, if any.
Login
[an error occurred while processing this directive] File: body-banner.shtml Creator: George Ferguson Created: Tue Dec 6 13:27:12 2011 Time-stamp: Duplicate URCS Drupal banner. hajim urcs
Computer Science @ Rochester
Page Not Found : Department of Computer Science : University of Rochester Skip to main content
Rochester shield
  • Apply
  • Visit
  • Give

Search Rochester.edu

Hajim School of Engineering & Applied SciencesDepartment of Computer Science

Site Navigation

  • About Us
    • Overview
    • What is Computer Science?
    • Employment
    • History
      • 50th Anniversary
      • PhDs Conferred
      • In Memoriam
    • Engagement and Enrichment
    • Giving
    • Contact Us
  • People
    • Full Directory
    • Faculty
    • Graduate Students
    • Staff
  • Undergraduate
    • Overview
    • BS in Computer Science
    • BA in Computer Science
    • Minor and Clusters
    • Courses
    • Advising
    • Getting Experience
    • CS Lab Information
    • Applying
  • Graduate
    • Overview
    • Master's Program
    • PhD Program
    • Courses
    • Applying
  • Research
    • Overview
    • Computer Systems
    • Theory
    • Artificial Intelligence
    • Human-Computer Interaction
  • News & Events
    • Recent News
    • Seminars & Talks
    • Newsletter
    • Distinguished Gifts
    • Commencement

Page does not exist.

  • Overview
  • What is Computer Science?
  • Employment
  • History
    • 50th Anniversary
    • PhDs Conferred
    • In Memoriam
  • Engagement and Enrichment
  • Giving
  • Contact Us
  • Home
  • About Us
  • Contact Us

Missing page.

Sorry. The page you requested does not exist on the Department of Computer Science website

Return to the Computer Science Home Page

Report a Digital Accessibility Barrier

Department of Computer Science

Location
University of Rochester
2513 Wegmans Hall
P.O. Box 270226
Rochester, NY 14627
Phone
(585) 275-5671

Resources for

  • Prospective students
  • Current students
  • Parents & families
  • Faculty & staff
  • Alumni

Schools & divisions

  • School of Arts & Sciences
  • Hajim School of Engineering
  • Eastman School of Music
  • School of Medicine & Dentistry
  • School of Nursing
  • Simon Business School
  • Warner School of Education
  • Laboratory for Laser Energetics

Libraries & collections

  • University Libraries
  • Memorial Art Gallery

Helpful links

  • Intranet
  • Web Communications
  • Contact
  • Directory
  • Human resources
  • UR Mobile (app)
  • Parking & shuttles
  • Information technology
  • Blackboard
  • myURHR
  • MyPath

Ever better

  • Global engagement
  • Accessibility
  • Vision & Values
  • Office of University Engagement and Enrichment
  • Nondiscrimination & Title IX

More URochester

  • News
  • Events
  • Athletics
  • Arts
Two University of Rochester students working on an experiment in a lab.Exterior profile of the University of Rochester’s Eastman School of Music. University of Rochester student plays the violin during a concert.
  • Facebook
  • YouTube
  • X / Twitter
  • TikTok
  • Instagram
  • LinkedIn
  • Threads
  • Follow URochester
Three University of Rochester sophomores posed together while wearing University of Rochester hats. The University of Rochester Rush Rhees Library bell tower at sunrise. Close up of a therapy dog’s nose on the University of Rochester river campus.
University of Rochester logo
  • Contact us
    (585) 275-2121
  • See maps and directions
    Rochester, NY

Search Rochester.edu

  • Privacy
  • Copyright
  • Emergency Information

© University of Rochester 1996–2026

[an error occurred while processing this directive] File: body-title.shtml Creator: George Ferguson Created: Tue Dec 6 14:34:49 2011 Time-stamp: SSI variables for this template: section_name First line of title on page (if any) title Title shown on page

[an error occurred while processing this directive] DMS102/CSC170D: Introduction to Web Development
Spring 2013
[an error occurred while processing this directive]
Assignment 8: DOM

For each of the following questions, start with the example document linked here: dom-example.html. You can of course also experiment with other documents as you explore the DOM.
  1. [4 pts] Add a script element at the end of the document body that asks the user for some text and sets both the toplevel heading and the document title to that text.
  2. [4 pts] Add a script element at the end of the document body that asks the user for some text and adds it as a new item in the second list.
  3. [4 pts] Add a script element at the end of the document body that asks the user for an element id and then makes the element with that id (if any) disappear. Be sure to check that there is such an element. Lookup the display CSS property (and corresponding property of the element's style object) for how to make it disappear.
  4. [4 pts] Add a script element at the end of the document body that first asks the user for an element id. If there is such an element, ask the user for a color name and set the element's style object's color property to that color.
  5. [4 pts] Add a script element at the end of the document body that asks the user for an HTML class name and a color name, and then sets the color of all the elements of that HTML class to the given color.

Things to think about

  • You need to know the basic DOM methods for getting elements of the document: getElementById returns a single element (or undefined). getElementsByTagName and getElementsByClassName return (possibly empty) collections of elements (technically, these are NodeList objects).
  • You need to know how to iterate through the elements in the collections returned by getElementsByTagName and getElementsByClassName.
  • You need to know how to use an element's style property to change the element's appearance. The properties of a style object are the CSS properties, with the names adjusted to use Javascript identifiers (i.e., CamelCase rather than hyphens).
  • For this part of the assignment, we make our scripts run after the document has loaded by putting the code at the end of the body element. Very soon we'll learn how to trigger behaviors from mouse clicks and other events.

[an error occurred while processing this directive] File: doc-finish.shtml Creator: George Ferguson Created: Tue Dec 6 13:46:48 2011 Time-stamp: [an error occurred while processing this directive] File: body-footer.shtml Creator: George Ferguson Created: Tue Dec 6 14:43:56 2011 Time-stamp: Content at bottom of page, if any.

Last update: Friday, 05-Apr-2013 14:51:55 EDT

Department of Computer Science · University of Rochester
734 Computer Studies Bldg. · P.O. Box 270226 · Rochester, NY 14627
tel: 585 275-5671 · fax: 585 273-4556 · info@cs.rochester.edu
Hajim School of Engineering and Applied Sciences
[an error occurred while processing this directive] File: body-finish.shtml Creator: George Ferguson Created: Tue Dec 6 13:47:36 2011 Time-stamp: [an error occurred while processing this directive]