Javascript Cheat Sheet: by Via
Javascript Cheat Sheet: by Via
Number Any numeric value isNaN() Returns true if something is not a onmouseup A mouse button is released
String Characters inside quote marks number. onmousemo The mouse moves
setTimeou Specify that am action should ve
Boolean True or False
t() occur on a particular schedule ondblclick A double click of a mouse button
Null Empty and meaningless
Math.floor Rounds a number down
onclick A single click (down and then
Object Any value associated with the object
Math.rand Generaters a random number up) of a mouse button
Function Value returned by a function
om between 0 and 1
onreset A reset button is clicked on a
getElementsByTagName() form
Operators
getElementById() onkeydown Triggered when a key is pressed
x+y Adds x and y together
down
getElementsByClassName()
(numeric)
onkeyup Triggered when a key is
element.in returns all the HTML between the
x+y Concatinates x and y together
released
nerHTML opening and closing tags
(string)
element.no property, returns the number of onkeypress Triggered when a key is pressed
x-y Subtracts y from x
deType the node type and then released
x*y Multiplies x and y together
element.ch A node list of child nodes that are
x/y Divides x by y Comparisons
ildNodes indexed numerically, and appear
x%y Modulus: The remainder when x is in source order. x == Returns true if x and y are equal
divided by y element.ch Returns the number of child y
x++, ++x Adds one to x ildNodes.l nodes of the element x === Returns true if x and y are identical
ength y
x--, --x Subtracts one from x
jQuery - other