WP Assignment
WP Assignment
Assignmert Date:
Javascit Intexpaetx
The indespaetex executes the
1Javascxsipt code ich is cmbedded a web page
Usez inieskacebackencl. It is basica.lly used ta daas he
|6widgets ike combo boxes d wdous.
De:
Data pexsstence.
Tas is a Slnall. databa[e cucated ah
local daiveNs o he cmpates whese the bacwsex is
hsBalled
OUTPUT
One
ceb desiqmex
4Placing cGs in a Gepaxate ile allecs the CHIML)
Campletely diffezentiate bls content
desigz CC8s)
4Exteanal css is a ile that contains ohhy css code
6 is Saved soith a css" file extensiph,
4 Tais css hle is dhen efesenced myeux HIML Uain
the Kinks astead oh rstyies
Demo.html:
rhtml
rhead
<link gel 'Ghylesheet" ype ost less" haek
<Lhead
"fest.css"S
sbody>p Hella Faiends K/p>
<pid-"pasaT', Hos axe yeu<lp>
<lbody>
r/html)
Page No. 5
Date:
test.csS
textaligni cendez
Cutput
Helo Faiends.
Ho ase yau
HIML ode:
<lDocIYPE htl
<htm)
sheads
ctitles y Web age <Hitles
</head
fbody
kh welcome lh1)
<p> Ihis is a pazaqaaph </p)
<l List item 1 </li
<Jbady
</htas
Ijaxascaipt
MRetaieve the shi clement by its ID atlzibute
Vaz headex =_documant getElesmcnt By Id Cheaden I
Change the text content cf he thD element
beadex.text Cantent- "Hello woxid "
Q h this example,e fast zetrieve the Khs'elemeht
MGiMa the 'getElesrent By Idci'aethed d stoae it in a
vasiable called "headez'Then we use the textcontent
pzapexty ta change he text cantei ef the Kh
elernen ta "Hell wWoxld !"
46 How cient.gide scaipting lanquage inmpaeve the
pexfoamance o7 website2
4Client-side scsigting lanquaqes Such As Java. Scaipt can
impsoa the pex~esmaze afa ccheite n sexexalsays:
Reduce Gevex loads
Chent.side sexipting lanquage allou
the client's bscsex instead o the Semveg his
dedtuces the laad oh fhe gCXVeY can impzave The axezal
pesfoamance of the cebaite
’Resuce page load tnest
By using cient side scaiptinq.you
con load Content dunamically oh the page imstead of
loading it al at once Ihis geduces fhe amont ok data
Page No.
Date:
Validate mput:
Chent- Side scaipting can be used to
validote uses input on he chient- Bide befoae Gendinq
it to the senvex This can impãove the accuãacs of he
data cateaed by useas seduce the numbex_oY seavez
Dequests Jequized ox ex03 casaection
Caghing
Clhent.side scipting can also he ibed fox achinq
Iaescusces on the cient side ,khich can geduce the humhe
Lok dequects to fhe sexver impxave the bexfog nahce
o fhe ebsite
Z]Iaaite Java Senipt to validate emoail D d mobile nualen
nEmail Validotion urction
fmchon validate Ernail CemailJE
Yaa Cmail Reqex AlwtcK.-12\w+)@la+ CL1?
HIML
<hiaid:"paxa1") #pasal
Hello faisnds colox: bhue
<Ih1)
Class':
The class selectox is USed to speci7y a shyle tod
a gsoup of eleents.
4|The class Ge lectox uses the HtML cass attaibute is
de~ined sith a !," in css
HIML
<hl clas5- ny Class"'> ,myClass
Hello Faiends Colex: bue:
KIh1)
Llhi) OTPOT
<hi class-"myCiass)
Evesyene Hella Faierds WBluc caloed
<lhi) Hew aac ye
Sveyene
3Gtate taue as ansuiet: Java Scsipt
lis mtypedJanguaga"
SFalse Java.Scoipt is a dypamialiy yed longuage,4shich
meang that fhe ype ok a Vaziable can chainge
duzing untirne.
LFos exaaple, a vaaiable that aJas psevioucly balaing a
stsing- Yalue can latex be assigmed e mumber
This is ain contiast to astaticalhy typed language ike
Page No. 14
Date:
Destroy Gossion
Gession.destey C);
Page No. I5
1Set a Coakie
Setcookie Cisezname Anond' timet+ (G6400so) "/ "
letaieve the coakie
useahame = _coOKIE 'usexname'l:
Featuaes i
PHP is an epen-Gouxce Seavez-&ide Scaipting lanquage
4PHP is a caoss.plat foxm Janquage which mêans hatit
aindowsLinux ThacOs.
Can um on vaiaus cs ke
LPHP
L s gptimizedfox ieb-applicatims Can exccute
quickhy cspecialls ohen used euith a cachinq rncchanism
'Ske Cpcacbe
PHP has_a lazge d acive community o developeas,
shich meang 0bat hexe 0s a welth o aesouICes
avalabk fo anaming &taaubiesheoting
Tupes of Cantal Gtatements in PHP:
Conditional statements it,else. elseif
Loopinq Gtate ments fo, ohile, foxcach I
Jamp statemants [basak, Continue xetua]
fGWhat is use ef REQUEST c) asaau in PHP2
OUTP)I
OuTPUI
echo "dentical"; ’ Not identical
echo "Not identical ";
lbsking
Si1In tbe Fst step,a seavice poovidex publishes a web
LSexvice n the eb Gervice geqistas
5:2Aeh client who demands fox some seb:SEvices.
Senarcbes in the egisby Ahex fndga agtch Fox he
desixed tieb seavice mfhe gistsAtex indhsq
oatch fos the desiaed sieh Seavice n fae Seqista,
Hhe client chooses it
S3The client bimds o the age Spon
arsespondinq wch-evice
paovideg invekes ux the sexvice
We, Seovice
Riblish Tinds
web sexvice web Gevice