This document is a cheat sheet for JavaScript, covering functions, strings, numbers, arrays, event handlers, and regular expressions. It includes various methods and properties associated with each category, providing quick references for developers. The cheat sheet is authored by janslow and was last updated on June 28, 2014.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views2 pages
JSfullMethods
This document is a cheat sheet for JavaScript, covering functions, strings, numbers, arrays, event handlers, and regular expressions. It includes various methods and properties associated with each category, providing quick references for developers. The cheat sheet is authored by janslow and was last updated on June 28, 2014.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
JavaScript Compilation Cheat Sheet
by janslow via cheatography.com/1842/cs/565/
JavaScript Functions Misc (cont) JavaScript Numbers and Maths
decodeURI() isNaN() element.in returns all the HTML between the abs() min()
decodeURIComponent() Number() nerHTML opening and closing tags acos() NEGATIVE_INFINITY
encodeURI() parseFloat() element.no property, returns the number of asin() PI
deType the node type encodeURIComponent() parseInt() atan() POSITIVE_INFINITY element.ch A node list of child nodes that are escape() String() atan2() pow() ildNodes indexed numerically, and appear eval() unescape() in source order. ceil() random()
isFinite() element.ch Returns the number of child cos() round()
ildNodes.l nodes of the element E sin() JavaScript Strings ength exp() sqrt() charAt() slice() floor() SQRT1_2 JavaScript Arrays charCodeAt() split() x LN10 SQRT2 concat() slice() concat() substr() LN2 tan() join() sort() fromCharCode() substring() log() toSource() length splice() indexOf() toLowerCase() LOG10E toExponential() pop() toSource() lastIndexOf() toUpperCase() LOG2E toFixed() push() toString() length toLocaleLowerCase() max() toPrecision() reverse() unshift() localeCompare() toLocaleUpperCase() MAX_VALUE toString() shift() valueOf() match() x toSource() MIN_VALUE valueOf() replace() x valueOf() NaN Adding to an array search() x .length Adds one value to the end of an String object methods with an x support regular Event Handlers property array expressions. onabort The user aborted loading the push() Adds one or more items to the end of an array page Misc onblur The user left the object unshift() Adds one or more items to the parseInt() Takes a value and tries to convert beginning of an array. onchange The user changed the object it to an integer onclick The user clicked an object isNaN() Returns true if something is not a Remove item from an array onerror The script encountered an error number. pop() Removes the last item from the array onfocus The user made an object active setTimeo Specify that am action should shift() Removes the first item from the array ut() occur on a particular schedule onload The object finished loading
onmouseove The cursor moved over an
Math.floor Rounds a number down r object Math.rand Generaters a random number onmouseout The cursor moved off an object om between 0 and 1 onselect The user selected the contents getElementsByTagName() of an object getElementById() onsubmit The user submitted a form getElementsByClassName() onunload The user left the page
onmove The window is moved
By janslow Not published yet. Sponsored by Readability-Score.com
cheatography.com/janslow/ Last updated 28th June, 2014. Measure your website readability! Page 1 of 2. https://readability-score.com JavaScript Compilation Cheat Sheet by janslow via cheatography.com/1842/cs/565/
Event Handlers (cont)
onmousedo A mouse button is pressed down
wn
onmouseup A mouse button is released
onmousemo The mouse moves
ve
ondblclick A double click of a mouse button
onclick A single click (down and then up) of a
mouse button
onreset A reset button is clicked on a form
onkeydown Triggered when a key is pressed down
onkeyup Triggered when a key is released
onkeypress Triggered when a key is pressed and then
released
JavaScript RegExp Object
compile() lastParen
exec() leftCOntext
global multiline
ignoreCase rightContext
input source
lastIndex test()
lastMatch
By janslow Not published yet. Sponsored by Readability-Score.com
cheatography.com/janslow/ Last updated 28th June, 2014. Measure your website readability! Page 2 of 2. https://readability-score.com