SlideShare a Scribd company logo
Methods
Object
toString
toLocaleString
valueOf
hasOwnProperty
isPrototypeOf
propertyIsEnumerable
String
charAt
charCodeAt
fromCharCode
concat
indexOf
lastIndexOf
localeCompare
match
replace
search
slice
split
substring
substr
toLowerCase
toUpperCase
toLocaleLowerCase
toLocaleUpperCase
RegEx
test
match
exec
Array
concat
join
push
pop
reverse
shift
slice
sort
splice
unshift
Number
toFixed
toExponential
toPrecision
Date
parse
toDateString
toTimeString
getDate
getDay
getFullYear
getHours
getMilliseconds
getMinutes
getMonth
getSeconds
getTime
getTimezoneOffset
getYear
setDate
setHours
setMilliseconds
setMinutes
setMonth
setSeconds
setYear
toLocaleTimeString
FUNCTIONS AND METHODS
A method is a type of function, associated
with an object. A normal function is not
associated with an object.
REGULAR EXPRESSIONS - MODIFIERS
/g
/i
/s
/m
Global matching
Case insensitive
Single line mode
Multi line mode
EVENT HANDLERS
onAbort
onBlur
onChange
onClick
onDblClick
onDragDrop
onError
onFocus
onKeyDown
onKeyPress
onKeyUp
onLoad
onMouseDown
onMouseMove
onMouseOut
onMouseOver
onMouseUp
onMove
onReset
onResize
onSelect
onSubmit
onUnload
JavaScript
DOM Methods
Document
clear
createDocument
createDocumentFragment
createElement
createEvent
createEventObject
createRange
createTextNode
getElementsByTagName
getElementById
write
Node
addEventListener
appendChild
attachEvent
cloneNode
createTextRange
detachEvent
dispatchEvent
fireEvent
getAttributeNS
getAttributeNode
hasChildNodes
hasAttribute
hasAttributes
insertBefore
removeChild
removeEventListener
replaceChild
scrollIntoView
Form
submit
DOM Collections
item
Range
collapse
createContextualFragment
moveEnd
moveStart
parentElement
select
setStartBefore
Style
getPropertyValue
setProperty
Event
initEvent
preventDefault
stopPropagation
XMLSerializer
serializeToString
XMLHTTP
open
send
XMLDOM
loadXML
DOMParser
parseFromString
REGULAR EXPRESSIONS - FORMAT
Regular expressions in JavaScript take
the form:
var RegEx = /pattern/modifiers;
REGULAR EXPRESSIONS - PATTERNS
^
$
.
(a|b)
(...)
[abc]
[^abc]
a?
a*
a+
a{3}
a{3,}
a{3,6}
!(pattern)
Start of string
End of string
Any single character
a or b
Group section
Item in range (a or b or c)
Not in range (not a or b or c)
Zero or one of a
Zero or more of a
One or more of a
Exactly 3 of a
3 or more of a
Between 3 and 6 of a
"Not" prefix. Apply rule when
URL does not match pattern.
Functions
Built In
eval
parseInt
parseFloat
isNaN
isFinite
decodeURI
decodeURIComponent
encodeURI
encodeURIComponent
escape
unescape
Window
alert
blur
clearTimeout
close
focus
open
print
setTimeout
JAVASCRIPT IN HTML
External JavaScript File
<script type="text/javascript"
src="javascript.js"></script>
Inline JavaScript
<script type="text/javascript">
<!--
// JavaScript Here
//-->
</script>
Available free from
AddedBytes.com
XMLHttpRequest
Safari, Mozilla, Opera:
var req = new XMLHttpRequest();
Internet Explorer:
var req = new
ActiveXObject("Microsoft.XMLHTTP");
XMLHttpRequest readyState Values
0
1
2
3
4
Uninitiated
Loading
Loaded
Interactive
Complete
XMLHttpRequest Object Methods
abort()
getAllResponseHeaders()
getResponseHeader(header)
open(method, URL)
send(body)
setRequestHeader(header, value)
XMLHttpRequest Object Properties
onreadystatechange
readyState
responseText
responseXML
status
statusText

More Related Content

PPT
C operator and expression
PPTX
Presentation 1-past-perfect-in-passive-voice
DOC
String in c
PPT
Participles
PPTX
User defined functions
PPTX
Express JS Rest API Tutorial
PPTX
Degree of comparison
PPTX
Dynamic memory allocation in c++
C operator and expression
Presentation 1-past-perfect-in-passive-voice
String in c
Participles
User defined functions
Express JS Rest API Tutorial
Degree of comparison
Dynamic memory allocation in c++

What's hot (20)

PPTX
Data Structures - Lecture 9 [Stack & Queue using Linked List]
PPT
Angular Introduction By Surekha Gadkari
PPTX
Passing an Array to a Function (ICT Programming)
PPTX
Prepositions of place at, in, on
PPS
Wrapper class
PDF
Programando em python listas
PPT
Direct and Indirect Speech
PPTX
DIRECT AND INDIRECT NARRATION
PPT
Strings
PPTX
Elementary transformation
PPT
Mesics lecture 6 control statement = if -else if__else
PDF
Preprocessor
PDF
DSD-INT 2019 The Incident Management Forecasting System (IMFS) for England - ...
PPT
PPTX
PPTX
What is component in reactjs
PPTX
Unit 2. Elements of C
PPTX
PPTX
Suffixes
Data Structures - Lecture 9 [Stack & Queue using Linked List]
Angular Introduction By Surekha Gadkari
Passing an Array to a Function (ICT Programming)
Prepositions of place at, in, on
Wrapper class
Programando em python listas
Direct and Indirect Speech
DIRECT AND INDIRECT NARRATION
Strings
Elementary transformation
Mesics lecture 6 control statement = if -else if__else
Preprocessor
DSD-INT 2019 The Incident Management Forecasting System (IMFS) for England - ...
What is component in reactjs
Unit 2. Elements of C
Suffixes
Ad

More from hccit (20)

PDF
Snr ipt 10_syll
PDF
Snr ipt 10_guide
DOCX
3 d modelling_task_sheet_2014_yr12
DOCX
3 d modelling_task_sheet_2014_yr11
DOC
10 ict photoshop_proj_2014
PDF
Photoshop
PDF
Flash
PDF
University partnerships programs email
PDF
Griffith sciences pathway programs overview
PDF
Griffith info tech brochure
DOC
Pm sql exercises
PDF
Repairs questions
PDF
Movies questions
PDF
Australian birds questions
DOCX
Section b
DOC
DOC
DOCX
Section a
PDF
Ask manual rev5
DOCX
Case study report mj
Snr ipt 10_syll
Snr ipt 10_guide
3 d modelling_task_sheet_2014_yr12
3 d modelling_task_sheet_2014_yr11
10 ict photoshop_proj_2014
Photoshop
Flash
University partnerships programs email
Griffith sciences pathway programs overview
Griffith info tech brochure
Pm sql exercises
Repairs questions
Movies questions
Australian birds questions
Section b
Section a
Ask manual rev5
Case study report mj
Ad

Javascript cheat-sheet-v1