Advance Javascript (handwritten), Summaries of Computer science

The document introduces JavaScript objects and the Document Object Model (DOM). It explains how to create and manipulate objects, access and update their properties, and use arrays and arrays methods. It also covers how to select and manipulate HTML elements using DOM methods and CSS selectors. examples and code snippets to illustrate the concepts.

Typology: Summaries

2022/2023

Available from 05/01/2023

krish-8
krish-8 🇮🇳

5 documents

1 / 25

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
JAVA
SCRIPT
What
k
Spt
?
achieuea
goal
A
byoutex
Amay
aleheandiang
imtevacts
tvE
Hey
tiejut
babheued
Note
Mebaods
Date
Page
No.
aHexeat
ebjects
Propeties
mtuction
to
houg
eens
by
History
frae FEvest
WEs
BRowsER
-Scseesn
NowlgtemPekane
the
obet
buti
t alio
Togeth
e
head7
Location
(http/)
Wwwjaae.
Lom)
At
he.
he
hot
objeetex
eoch
elemaeoat
he
Date
When
the
bosex
cvtates
a
madel
d
Page
No.
DocUMENT
OBJECT
DocuNENI
vel
ShleS
hau!
hrey
css
Rretettes
URL
Lt
maclla
Hettods
Everts
taese obtect
ase
descibed
Docussest
Objet
adel(DoM)
<Bocy7
medel
k
aocummet
abect
benett
beoes Cye
alled
node
ht
also
ereet
ot
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19

Partial preview of the text

Download Advance Javascript (handwritten) and more Summaries Computer science in PDF only on Docsity!

JAVA SCRIPT

What k^ Spt^?

achieuea goal

A byoutex Amay aleheandiang imtevacts

tvE

Hey tiejut babheued

Note Mebaods

Page No.

aHexeat

ebjects Propeties

mtuction to

houg

eens

by

History

frae

FEvest

WEs BRowsER

-Scseesn

NowlgtemPekane

the

obet buti t alio

Togeth e

head

Location (^) (http/) (^) Wwwjaae. Lom)

At he. he

hot

objeetex eoch elemaeoat he

Date

When the bosex cvtates a madel d

Page No.

DocUMENT OBJECT

DocuNENI

vel ShleS hau! hrey css

Rretettes URL Lt maclla Hettods Everts

taese obtect ase descibed Docussest Objet adel(DoM)

ABoo LEA N

ARRAYS

ATA YeES

HON T1On

Voy

exþrealn, thea ecpreslem the

|Page No.

OBJECS

und-faed

EXPRESS10 N AnONYMOus

uldth heigent

callad

HMEDIATELY NVO KED tuNON

Preoned

eecLted Hheisn

Date Page No.

y theseLHew

ExpRESSIONNS

(LEES

mameTtead Haey ene

OBJECI

the mteetey lomes

keighte Yeteg widte *helglst

hne tHoiMethd

jectgu tog ethex^ a^ set^ ki^ ablu

and unete to create a model

(y

RRowsER OAJT MoDEL

Creote

WEA

is stoYed

foM

nodel ie CAllod

po CHbaerst

RRosER

As a^ byouseY^ loods^ a^ web^ þaget Hhat þage The DoM tyee amd^ t

Text

Atibute

Elemet Node

DOM

Am He

Node

Nodes

Nod es

Date |Page No.

LOBAL

Qwcl pooetiek

i)

Ay

access aud uþdate thls oeenot the Ore

macle

AcCESSNG

ha the

qenySeleckay )

Comnena heys

objectth inaethede

get Eleaneat By Td)

Page No.

Remeabex

to

-A) Conakaoaa^ neys^ to^ gelect^ mdiidal^ elemknt

THE ELEHaJIS

HTHL ile) to Hhe

get (^) Eleaeacta, Tag (^) Nasaae (

get EleanlatBy Cloy buae()

select maulthle elentk

bouses neey

changes

velected

5

avetNade

prulau

A)

WORRINNG Wm

i Hathdbute

ACESSPDATE

lSelt
GETIUPDATE EENE

ObodeValue

Nauigate to^ te^ text^ nod^

ek

he

oaheTML

3)textConteut

hodevatbe you mst te

lyt ale

Page No.

eleamet

Accen tet am

Chet/sct text hoesea

net! set^ text^ enly

documevit qet^ Elenl (^) B,sel( mext S bengnodeValue

Set test ely

TpTCONTENI)INNER

icttibute

4ext resh

Date Page No.

not obey CsS Det Conte t.

dousneast. qet Eatt By+d ('ene'tteet

Natemhextext Shauld be aveide d as it does Cond Aloex than

NNER HTHL

Retmy

attibute

T

Page No.

Vx ellonteast^ =^ dlecaantsts^ qet^ Bloydct

decabatast getElevEtRy Ta('Cae'^ bonert

Elaesnd Chied (neusText);

Date Page No.

Comteay El yensave Chtld (renmove E)

Exanpie

Vàr el E^ olaceneiat^ qet^ Elenent^ a,Jatue cl. addEventLUstenerbbliy^ che^ esesoes

teney tatxe^ s^ a Yemove hext Listerae()

Haadess Lstee

Page No.

Suppotng

ehth remeves

Evet

hecksemomes) faie )

(bly',-cheettt5fel5 nchsl

>ML eleMaeats nest mside atew

DEAULT

lime, yo be

nliK þaxeant element

EvENT

The edex n thica the eek ye i

False

The

haodieceas

BUBBING

hoesdng

Date Page No.

uhem your Code^ hes

aeetey oY

eueats ealy^ eelly^ ottes evect haudl elnet ame ome desceAdaut

EvENT CAPTU RINC

elementi

Whe euet occs

EVENTBJECT

target

yþe

telll you^ oYaMQ^ Hen^ aubaut tho event Qd^ he^ elemert^ it^ haphued

) ancelable

|Metaod

LES-Y Eaalentt

tyþe

Puge No.

IES-2 Eaalet

OfeuatlDelautl)

Iype euent

the tanset

yetAlue

belaate elemeat

ancel

eert

fuac toaa (^) checklsermame (e)

lsemcme)

Date

taxget Ec taaget

Page No.

el.acal (^) bentListeney (^) 'blr (^) checkuseene

funeteaa lierName (ea

false):

eAt Lie42neslth ARAMETER

'uyermamme

Vey taget tget

el addEemtlktenexl'tluy?,functiole

Cheekteyname (e, s): -

eiPoytnt taxget paxantAJete

elGuaalpot

el GaoLhasent tngetperttede-po.

4lepreetDelault)}

YetnVales faloe

Qhasping Lit)

Page No.

leldd EvetLsenes)?

el. addEest^ lsten^ (iceehy^ tnetHo item Domefe

iteaDene (e)

felse

6

LoAD

tetIooput Aocus)

Date

textTaute dnwmaent. getElementBy Td l'isername

Page No.

ottlhel to uhdow^ Ob

wthaalou add Event ictemer (loocl setu

checkllername l)

lHs. teat^ Gtent=^ Not^ loug^ enonghpek

myte dadl Ent us4ene('foy, ermane,

="elas' hre<^ ="">claje^ y

Why Lse^ TaDERY^ P

SHPLE SELECTORS

COMNON TASR IN

CRoSS -^ BRowS^ ER^ oyP^ ATßi^ LITY teature detecton^ i^ to to ahieve tak)

Page No.

uey lot^ dys^ suptoxt

BAsic SELEC TOP

LESS CoDE

FINDINGn tlEMENTS

eemaet #id

yelectyl, seletox

HELRARCHY

)aancestoy deseudy

  • blinss

BASLC HLTER

nt(selecto) :4t last

odc viiea (indew) vi gt(index)

Nheedey annated

focus

CALLO HLIERS

onth -child (expy)

fist- Chtld

im:letchild oly-chled.

isnput text

passaxd

Yada check box

FoRM

Date Page No.

CONTEMI ELTERS

ijCataùma ('tet)

i) bas selecte)

VSLBLLTY HLTER

i)visi ble

ATRLBLTE HTERs

att bute attibute = aluel [athibute {sthibe

vl)subnait )sclacked

x) buttoan iichecked

yl)

*slde)

M)de

fadeTe

tl)

lde()

PageNo.

Bote

Date

loodl)

YeaclyO

Douwtte

reete event EVENTS syens)

x)scxallLejt)

(delusiluct)uidtinl)

vi)f (doLianBijt).heightl)

DUdeY HelGht)

iJmnrHeight)

T ORDER SEEhon

uylont

ai) ts)

xì) 4etes

prtu()

vi) eaesctALa

aext(y

echlldenl)

() )paent

GENERAte

SELECTl beight)

)

1PageNo.

V)css)

() xatty

xi) addy

() aiprepeand

behaxt)

b

lace lwitthl)

î)text)

CONTENTT ALTERL

DoNG aNGa

$funttiom)

CHANGLN Ca CoNTENT

The alaustng Caleod

beore)

Atotenaernt

Page No.

Exounhle

Sfumction ()f

$('u') beloxe (^) (

Eale

$('it Hhree')^ eaoue^ Clas^ ('hot')

Page No.

$('i hot').add^ Clas^ 'lavete'):

3Set CSs þehey

su). cas(padding

he.ckgndfot^ fonil):^ 4Cowe

Cacho

Vay ids = ths. idi

Date |Page No.

$(this) apþenad^ Ken^ clas^ =oae

  • ids t'<The o^ O^ metaods^ used^ to^ hanclLle all

$ctbic. add Clas (tanabacte');

fousy blus Change Raybaadcus,lkllickmomeu asut mouseeve hove tora (^) submat, (^) Selict chang Docneat eady^ locd,^ unlosd