WDV221 Intro JavaScript

JavaScript Objects - String, Style and Date

String Object Assignment

Use the form provided on this page to complete the requested functionality.

Email Address:
Domain Name:


  1. Display Email Address button will display the email address entered in the form onto the page. The field cannot be blank and must be formatted as a valid email address.
  2. Display Username button will display the first part of the email address: Example student@dmacc.edu will display 'student'.
  3. Display Domain name button will display the domain name of the email address: Using the above example will display 'dmacc.edu'.
  4. If the email address has a top level domain of .edu change the Domain Name display to a light blue background.
  5. The "Enter New Email" button should return the form and the display fields to their original values.