Introduction to JavaScript Fall 2011 Class 3
esse quam videri
Back to Introduction to JavaScript Fall 2011
Contents
Lecture
If/Else Switch statement
Functions
DOM properties and Methods
Alternate source for DOM Methods and Properties
sending functions arguments
var first = 10; var second = 30; function addition(someNumber, anotherNumber){ return someNumber + anotherNumber; } sum = addition(first, second);
event details and the this variable
document.getElementById('anchor').onclick = function(e){ e.preventDefault(); console.log(this.href) }
Homework
In-Class 4
Assignment 3
Proposal for Project 1