Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
15 Cards in this Set
- Front
- Back
JS Arrays |
var x = [] |
|
JS Objects |
var x = { }
|
|
JS Functions |
function func() {}; |
|
JS Anonymous Functions |
function(a,b) {return a+b} |
|
JS Events and Event Handling |
click, mouseover, etc
|
|
JS Capture Phase |
bubbling = child first
|
|
JS Bubbling Phase |
capture = parent first |
|
JS Event Target vs Current Event Target |
the target is the element that receives an event, current target is the element that's listening. Container with buttons inside. |
|
Event objects and properties: preventDefault(), stopPropagation |
prevents default action of an event, such as a clicked link taking a user to the linked page |
|
addEventListener() method on elements |
easy |
|
Different ways of setting event listeners |
1. 2. document.getElementById("test") -> x.onclick = function() {}3. .addEventListener("click", function(){}, [phase]); |
|
AJAX |
Asynchronous Javascript and XML |
|
XMLHttpRequest object |
new XMLHttpRequest() onReadyStateChange... etc etc |
|
XMLHttpRequest properties |
.readyState 0 before open, 1 open is called, 2 response header received, 3 response is loading, 4 response is complete .status 200 = complete xhr.responseText |
|
XMLHttpRequest methods |
open("get","servlet?blah=blah&etc=etc") open("post","servlet") send(req.body) |