WP Ass 3
WP Ass 3
Assignmest -
an HML pase
feimasy Huction
soide te Soguested outpd is to manipLsate and
pieide accesi to th
Sequaty
Gos dato
ATMLss Javascsitae PHR, Ruthon, Baia, Huey
PAGE NO.
DATE:
alertHhello,LOosid)
2 Cooimi
The coro unehión displau
mesgse o"k Bulton and a cancel"sbtto,
DATE:
BPsom
The poonpt) funchon isplays a popup box
message san input hield,a"oK" buon and
to pompt ne user
Ro[ input and sotun the aue entesed byt
hesex Cauncel
Hese an exampe
Coame la oull)
Cocsale log CHello'tnamet")
3 lee
"234SLA%90
Vas input e
valic = Validote MobileNumbex
RC Valid) tidete Motietee liaput:
Ce0solelogoLile numbes is yalid")
Conscle l6gCMobile umbes isinvald
2 digit length.
cctioa oltdateMobile Number (MobileNunmber)f
molaileNumbere MobileNurobes. Saplace (AD/5
CmcbileNanbes length l== lo)
2
tehuso tsue
DATE:
setusn t6ue
3 exanple.comy
Nar inpt= "eaample CiopLt;
alidateCooail dsess
Vah is Valide
Cunsalelegc"eomçl addsss is valid.";
loel"email adadrexe is invalid"
Cansole.
andaeenpt
B4Design aloqio Borm ising HIML
Láith Solleioina alidation ubing Wegdas rpress
on sesname lh ipasesosd hield
1)Usoname and paseird shoudd not be both blank
)UEesme shold nat stast Loth digit,-<QorÅ
3)rassaptd length hst be &to l6choaeteg
Ans<lDociYPe btml)
Khead
<HHe>login fasomk/he)
Auncioo Validotelegin fosm O
yar usenamez docLnentget AemetByld
userane)ale
yah pessoosd edocum ent .aet lement Byià(
podsid Valuej
h usex Yatten ^ o ) * $
1Gbesrame. tsiniselh|lpasssdtoio
alestCSename and Pasc.eoood: gheulcd not
be blank")
PAGE NO.
DATE:
Sctsn 13e:
estCpasSLDord
lon!)
alext CRassord mst be 8to6 oha,
Nchusn false
Cusesna me YateSntetlusexnaoe))
iP eihdiat
alet CMusesesnme shoulo net Stast
Kehixn alse 't,"):
Teusn toue
<sciD4
<hi)login fosm/h)
<fesso on ubmt erurn validateloginfox;"
achion "leginphp' metha "post")
label geusesOameUsesname</\abel)
<hpt h pe="text" dusenane' names'Lserane
<inpt hupes passubosdid:possaod" Dame.passo
k/body
K/htm
ohat is doaune ojed medel?2xplain any
objed with eanpe.
PAGE NO.
DATE:
<headi:
<tite)Decumert Olajet example &hile)
Ranctioo Chians,etertC)
Yas plemert doument .get lemeOt Byld
element. innex HT
"mulement'):
e"Hellojo[lol !":
/scmipt)
<Ihead
dbody
<h1 id e"my lemetelick me to Change tesctdh
butnendickK changeText'ick nesbuttes
K/htm)
DATE:
'oindow'ihe oindo'
ebjcd pepsesent the broL
toindoLo Lscme Loithin LoindoLmethos
ouicdes melhedo, and porouide Gnd
and pbopesi es relateted to the coirdo oy foams
tSelf,as oell as the docuument displayed in
the Loiodes foaDe.
Doc1yPE htool)
head)
KAHe) eindas obiech îxampler/e)
KscriptJ
hunchon sholest C)
ondo.alest Chis is analet');
3
Aunchioo sedised TaGsogleCs
LoicdoOlocaiog hsefbtp slaa. qoAle.
Klecsipt)
heac
<hil loindos Dbjeat Pamplexk1)
< butbn ondick lsholext") shoLAlrt</hut
<butto
DATE:
Pne:<DOCTY Pe btal
<htol
Khead
<iMesPoime Nubex Checkes <Ate
nodioo isPsimeCoumber
if Courobex <=1
Yeuon false
detuso faleei
Cincion cheakNunlber OR
Nats OumbexdoCumest, 4etlemeit Buld
CuntezloputValua;
i CeNani Coumber)
alert C"Please erey a dalid istegex numter
</&cipt)
Rhead
Kbed
<hi)Pai ne Nionbes
Chcckes<hay
<om cnbmit*eyentoivertDeautC;
<label checkumbes );
fose"numbelnput >rtey ointeger
nimber<Aatel
input pe "text"
thutton hee
idenumbeslnput
nameznumbey lnÇty
pe lSubot>Check </but
<p id outpu</py
</body
Gzhe an HTYML and Javascipt
aceptsN as iaput' and pont Npogram
numbex i dd e
obich
even
Aas<DoCTYE html)
htonl)
khead
<hte)odd /even Nunbes Checkes </;le
Aunction check Dod even
Vasnz documet. getElemest Bu AC'Aumbex
Inpu).Valuc,
vasious
yp poiouides ToV09Cpt pdated beig
,ac Aeading Hahing buto,a
age ona
ng useses Suchas
a oooex
t es the in
happen
achoos
or javooipt
ase DoEvents
in
example oth
sptinJaa eventa 8xploany
hypee
c hoo
to ide'outpt</p
butonencickachedk pe
umberlnpu
me" ig?nnbex
Inpt ext ypea <ioput
Kabel
rnptEntes number
eger an <label
K/hi) Cecker Number
<hiSd/Eveo Kbody
sfstsipt)
3
bes
outpt;
setusn
e: ichaes avalid enBes Please alest
DATE:
N0. PAGE
PAGE NO.
DATE:
1) Ctck ven:
lick eeot oCos ohen a ubes clicke
Cs imaqeYeu Cas ute he oicking eevert tetu
execute a funcion os pes hoom
Lohen an element i licked
fos example
<DOCT YDE html)
<hBoal)
Khead)
Khte> Cicking Evet exarnple <Ate
håochon handleick cyf
alert" Buton cicked ":
ecsipt)
2)Load everti
The load eve ccus
Lohena oebpage
Rashes leadingtoucan uee the load Cvent t tzigge
PAGE No.
DATE:
head
<HHes load evet Bxanple</titles
<scaipt
Ruoction handlle loadc
clest C"Page leaded");
<Iscmpt
</head
Kbody enloadabaindleláaÀC"
<hiload evert Example his
Hor CYari2<smth,24,stnu);itt)
tetusn Aalsej
PAGE NO.
|DATE:
3ehusntoue:
Vaz poimes 2 J :
Vas Qum= 2
oile Cpsime leng th <i6)
poime pcish Chunn)i
Nas isetioimes=
ConsoleoacIhe Rsst Ib pbime umbes ae:"+
Risstib Rsines joig c""
o Lonat is Savasesipt eent ardling?st the
maioseverts ad shoLJ Seol at least oe
eveot by omting Jovascsipt code.
Aos. Javoscaipt evest hadling iS he psocess of Lot
Code to Seond to aotoinsox oceusseNR that hae
Athe bsorose ,uch as use intescgctionS
Changes in the documegtx othes events
DATE:
or CXample
<lDocTYPe html):
<html)
khead
<hhescck Evegt example </AHe)
ncin handle CAicis C{
alert (uButtoo cicked))
</nead
kbody
<hi>aick euent example <
kbutbn ondick "handleeickC"lickme cJbutb
PAGE NO
DArE
</htm)
1 sie a Javalcipt o sec date
Sle ad poit t in tabulo Manes.
KlDOCTYP htm
htoal)
shead)
<tHe) XMAL Data Table faples </AHe
<syle
table
boxdes- cellaee icollapee
DATE
<AhCity/Ans
</Aheac)
<tbody
KAbedy
<Hable)
<scoipt
Pehch data.Xm)')
hen Csesponse ) sespoose.text)
RosClet izti<persons.length;it
Const pesson: pexonsi,
namecelltextCottt =rame
age Cel\.Jext Centet ae
aprerdhd Chanecel)
Soo.aplerd Child CageCelt):
KoLs.appendChild Ceity Cell);
tbedy:apperdChi là Csso),
tos exaople'
Aureso9 ößee Cone.callock
Callzack0j
Auncion ayrocdbyeOf
PAGE NO.
DATE:
DATE:
Oame"Alicel,
age B0,
iebtudent: fose
CousisesiC'nat, nistoi", chemistZ
ensadelogljsoo Stzingj