IP492F13A HTML5 3: Assignment One

HTML5 logo

PeerWise

Create a new question and answer all unanswered questions by next Monday. Please rate the questions as you do them.

 Writing JavaScript

Use jsbin or similar online tool to create two three pages that demonstrate the following principles. Keep track of the addresses of your pages so that we can review them in the lab.

Feature detection
  • Test this in several browsers and document which ones will fail.

Use document.getElementsByClassName(“”)

  1. Create a simple web page with several similar elements and add a class name to several of them
  2. Write a script that changes only the elements with that class name
Event Handler

Create a web page that uses element.addEventListener for two different events

  1. for the first event use an anonymous function for the handler
  2. for the second event use a regular function for the handler (i.e. write function first and then reference it)

Keep track of the addresses of your pages so that we can review them in the lab. Consider emailing them to yourself at an address where you can access them in the lab.

Advertisements

One thought on “IP492F13A HTML5 3: Assignment One

  1. Yuki says:

    passing an argument in an eventHandler function
    http://jsbin.com/lufef/2/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s