Sunteți pe pagina 1din 37

Page 1 Introduction

7/11/2013 4:05:10 AM http://prtkcse.byethost31.com/introd.htm


HD|E
Save thIs page as pdf
J
avaScrIpt
T
utorIal
What Is JavaScrIpt :
FIrst, JavaScrIpt Is not same as Java. t Is generally used wIth HT|L to create
InteractIve web pages. JavaScrIpt Is one of the pIllars of web desIgnIng to
create dynamIc webpages. JavaScrIpt Is not a general programmIng language,
Infact It Is a scrIptIng language. A scrIptIng language Is the one whIch
provIdes access to prebuIlt components. n the case of JavaScrIpt, those
prebuIlt components are the buIldIng blocks that make up a Web page (lInks,
Images, plugIns, HT|L form elements, browser confIguratIon detaIls, and so
on). JavaScrIpt provIdes programmatIc control over objects of Its
envIronment.
JavaScrIpt Is a clIentsIde scrIpt I.e. It Is executed InsIde the browser and not
at the server. t extends the core language by supplyIng objects to control a
browser and Its 0ocument Dbject |odel(0D|).
What do you need to start It :
You don't need heavy hardware or software requIrements for JavaScrIpt. An
updated browser and a faIrly good 0E wIll do. For 0E, would suggest
php0esIgner 8. Although It sounds lIke It Is a php 0E, but It supports
JavaScrIpt, CSS and many other languages too. t acts lIke a complete
package to develop a web sIte.
ClIck here to download php0esIgner 8
Page 2 Introduction
7/11/2013 4:05:23 AM http://prtkcse.byethost31.com/introd.htm
A lIttle hIstory
JavaScrIpt, not to be confused wIth Java, was created In 10 days In |ay 1995
by 8rendan EIch, then workIng at Netscape and now of |ozIlla. JavaScrIpt
was not always known as JavaScrIpt: the orIgInal name was |ocha, a name
chosen by |arc Andreessen, founder of Netscape. n September of 1995 the
name was changed to LIveScrIpt, then In 0ecember of the same year, upon
receIvIng a trademark lIcense from Sun, the name JavaScrIpt was adopted.
ThIs was somewhat of a marketIng move at the tIme, wIth Java beIng very
popular around then.
JavaScrIpt and Java
Page 3 Introduction
7/11/2013 4:06:06 AM http://prtkcse.byethost31.com/introd.htm
PPPPPPPPPP PPP PPP
Page 1 JavaScript and HTML
7/11/2013 3:59:23 AM http://prtkcse.byethost31.com/jh.htm
EEEE
ffff ffff ffff ff fff
J
ffffttfff
T
lfltffl
Els ff sltsf
Jffffttfff tfs sf tlsfffftff ff fs fsffsffls fl ETEs sftflff ff fsffsff
yfsy flstfflsflfffffy ETEs ffff ttffff lsyftff sfftf tfs sf yfsffllffff sy
Jffffttfffy alt ffa aaEaaa fsf aaaEaaa ffff lff yll ttffff f afs ffff lt f
fltlyfsfy nf yll ffff fs fyfff fs ffff fltlyfsf sflff sfyf ff fftn fffs
yll tfs fttfff ffff fyfff fs Jffffttfff ff fltlyfsfyfftn fsf yll tfs
yfsffllfff ff fs ffffftfsf sfyfy
elfts fftf fl fffs fs fsfyflf
all tfs fff Jffffttfff fs yllt sfsffff fs : sfyf :
n) ttt ttt ttt ttt tttttttt ttt ttttttttt tttt tt ttttttt tttttttttt
ttttttt. tttt .ttt .... .ttt.
eeeenf yllt Jffffttfff tlff ff slf fll sff fffs ff ff yltf ffftlftffff fl fstllff
yllt Jffffttfff tlff fs yllt ETEs eeeefflfy esfsf fs fff ftfffllf fsfyflfa yll
ffs fff sfllf yffffttfff tlff sff stffffs sffsffs afttfffa fsf
eeeeaafttfffa ffffy ffstf ffftf ftf yfsy fttffff sfftf tfs sf fstllfff fs ETEs
fl fff ftflfl tlff ff afttfff fyff t eeeetffsfayffffttffftay alf fff ffffllf
fttfff ff Jffffttfff fl afttfffa sfll fly
:) ttt ttt ttt ttt tttttttt ttt ttttttttt tttt tt ttttttt tt tltttttt
tttttttttt .ttt tt .ttt .... .ttt.
eeeenf ff ftfffy yltf ffyflft fl sfstllff lf eaess lfsflffffy nf yll fttfff ff
ffty llsf fsf yll sfsf fl yfsf yllt eeeeETEs tlfft fsf fffya fl flt ffff
yffflfy Jlff stfff yllt fttfff tlsffsff fs ffsf fffflt fsf ffff ff ff f yyf fflfy
eeeeTff fysffs flt fstllffsf f yyf fflf fsfl yllt ETEs fflf ff :
eeeeafttfff lfsflfffttyffffttffft fttttyyyyfta
eeeenstllff fff fslff lfsf sffsffs affffa fsf aaffffa ffffy Tfftf ff f
ffffftfstf fs stfffsf yllt fttfff lsfft eeeeaffffa aaffffa fsf lsfft aslfya
aaslfya ffffy nf yll sfsf yllt fttfff fl sf fsftlfff ff flls ff yllt sfs
Page 2 JavaScript and HTML
7/11/2013 4:00:06 AM http://prtkcse.byethost31.com/jh.htm
page loads then Include It under head tags. f you want that some
partIcular event lIke mouse clIck should trIgger your scrIpt then Include
It In the body tags. DbvIously, we want to Include our external scrIpt fIle as
soon as page loads so we Included It In head tags.
0ocument Dbject |odel
Another Important aspect assocIated wIth JavaScrIpt and HT|L Is 0ocument
Dbject |odel otherwIse known as 0D|. The 0D| Is an AP for HT|L
documents. t provIdes a structural representatIons of the document,
enablIng the developer to modIfy Its contents and vIsual presentatIon.
EssentIally, It connects web pages to scrIpts or programmIng languages. The
0D| provIdes a standard framework for descrIbIng the organIzatIon of
elements In a HT|L document. The basIc functIon of 0D| Is to represent the
HT|L webpage as a tree of nodes. A 0D| document Node can be addressed
by begInnIng at the document root and lIstIng the descendant nodes. So
where does JavaScrIpt comes Into play: JavaScrIpt lets you manIpulate those
nodes. All of the propertIes, methods, events avaIlable to the web developer
for manIpulatIng and creatIng web pages are organIzed Into nodes of the
0D|. JavaScrIpt lets you access and manIpulate those nodes by usIng the
getElement8yd(), getElement8yName(), getElement8yTagName() methods.
For example, If you have a textbox whose 0 Is txt1 In your HT|L document
then you can access It In JavaScrIpt usIng getElement8yd(txt1) and you can
change Its propertIes. ClIck here to vIew an example
f you check the source code of the pevIous example, you wIll see that have
used the method getElement8yd() and passed the value txt1 as Its argument
and then used the value property to change the value In the textbox. Also,
If you have notIced, have used an onclIck attrIbute of HT|L Input tag. The
value of thIs attrIbute Is the name of the functIon whIch should be called
once user clIcks at the button and thIs functIon resIdes In the scrIpt.
n the prevIous example, once the value of textfIeld has changed, clIckIng on
the button wIll produce no effect. 8ut what If you want to toggle between
the 2 values of textbox: ClIck here to see. 0on't forget to look for the source
code.
Page 3 JavaScript and HTML
7/11/2013 4:00:37 AM http://prtkcse.byethost31.com/jh.htm
nn nnn nnn nnnnnnnnn nnn n nnn nnnn nnnn nnnnn nnnn nnnnn nnnn ennen nnnn
Page 1 Values, Variables and Literals
7/12/2013 3:19:45 AM http://prtkcse.byethost31.com/vvl.htm
ffff ffff ffff ff fff
J
ffffttfff
T
lfltffl
sfllff
Jffffttfff fff:ffffff fff fllll:f:f f:fff lf ffllff :
ssss ssssssss
4l44ftf 4444444444
elfftfl Ttlfeeflff
fftf:ff ""tffff""
:lll ftf4fffff ffllf4 4ff:f ffllf ff :lfff:f
l:ffff:ff f flfelfffl ftlfftf: :flff ffllf ff l:ffff:ff4 flfl ftf4fffff
n: lffft ftlftf44f:f lf:flffff lf"f nennneJfff4 :ll :fll ff:f f fffff:tffl:
4ff:ff: f:fffftf f:f tfflefllffe :l44ftf4 elf f: Jffffttfff fff: ftf ff4f
f4f4 :l44ftf4 Tfftf ftf :l feflftff fffff:fff f: Jffffttfff4 fl :ll fl:ef ffff
fl fftlftf f:f4 fllff fft4
Jffffttfff ff f f::f4ftfll: f:fff lf:flfff fl fffff:fff ftf tl:fftfff
flfl4ffftfll: ff :fffff fltf:f feftlffl:4 fl :ll tf: ffff:f f fftff4lf ff
fllll:f :
fft e ; 44;
f:f fff: lffft :ll tf: fffff: fff ff4f fftff4lf f fftf:f ffllf lf"f :
e ; "ftffff""
f:f ff :l:ef ftlfltf f:: fttlt4
nf ffftf ff f: feftffffl: :fftf tl:fff:f f fftf:f ffllf f:f f :l44ft ffllf
:fff f n lfftfflt4 fff: fff :l44ft ffllf ff flfl4ffftfll: tl:fftfff fl
fftf:f4 elt fef4flf4
fft e ; "n f4"n44;
fff: fff ffllf lf e ff n f4444
Page 2 Values, Variables and Literals
7/12/2013 3:19:45 AM http://prtkcse.byethost31.com/vvl.htm
oll tf: lff fftffn:fee f:f fftffellffee 4ffflff fl tl:fftf fftf:ff fl
f:fffftf f:f tffl :l44ftf tfffftffffl:4 elt fef4flf4
fft e ; "44";
: ; fftffn:feee;
; ; e n ;4;
4 ; : n ;4;
Tff ffllf lf ; :fll 4f 44;4 :fftfff fff ffllf lf 4 :fll 4f 4.4
sftff4lff
sftff4lff ftf f::fff:f ffff tf: tl:fff: ffllff4 nf ff ylff f :f4f lf f 4f4lt:
lltfffl: :fftf f ffllf ff ffltff4 Tff :f4ff lf fff fftff4lff4 tfllff
fff:ffffftf4 tl:flt4 fl tftfff: tllff4 nf 4lff ffftf :fff f lfffft4 l:fftftltfe_
e4 lt flllftese fff: f:f fl4ffslf:f tfftftfftf tf: flfl 4f ffffff4 Jffffttfff ff
tfffeff:ffffff fl "fff ffff f: 4f:f :ff: :ll :f4f fftff4lff4
sssssssss sssssssss
Tfftf ftf ; :f:f lf fftlftf:f fftff4lff :
4e e: lff:f fff fft "f::ltf4 elt fef4flf4 fft e ; 444 Tfff tf: 4f lfff fl
fftlftf 4lff lltfl f:f fll4fl fftff4lff4
;e e: ff4fl: fffff:f:f f ffllf4 elt fef4flf4 e ; 444 Tfff fl:f:f fftlftff f
fll4fl ffllf4
n: f lltfl ftlff4 fff fftff4lf :fll 4f lltfl fl fff tlff ffff fff 4llt" tffffff
:ffff:4 elt fef4flf :
ffeftlfe{
fft e ; ;;
}
tl:fllf4llfeee;
Tff ffllf lf e :fll 4f ftf:fff ff ; 4ftflff ff ff :lf lltfl fl fff ff 4llt"4
f:fftf ff ff lltfl fl fff tlff f: :fftf fff ff 4llt" tffffff4
s fftff4lf fftlftff lff:f f fft "f::ltf :fff :l f:ffffl ffllf ffftfffff fff
fff ffllf l:ffff:ff4 Tff l:ffff:ff ffllf 4ffffff ff fflff :ff: lfff f:
4lllff: tl:ffef4 cff: fffllfff:f f :lll ffllf4 ff 4ffffff f . f: :l4ftft
tl:ffeff f:f ff fflff f: 4lllff: tl:ffeff4
u:f fffff:tffl: f: fftff4lff ftl4 lffft ftlftf44f:f lf:flffff ff ffff :ll
tf: tffft fl f fftff4lf fftlftff lffft4 :fffllf fffff:f f: fetffffl:4 Tfff
Page 3 Values, Variables and Literals
7/12/2013 3:19:45 AM http://prtkcse.byethost31.com/vvl.htm
tl:tfff ff ":l:: ff flffff:f4 fl fff fllll:f:f tlff :fll :lt" :
tl:fllf4llfeee;
e ; 44;
slffllff e ff fftlftff lffft 4lf ff :fll ftf:f 444 nf ff4 "f:f lf4 e ff flfffff ff
fff flf4
elf fff fftff4lff :fftf ftf:ef f:fffflf;ff :ff :fll tfflt: l:ffff:ff4
.ll4fl fftff4lff ftf fflff fftff4lff :fftf ftf fftlftff llfffff lf f fl:tffl:4
.ll4fl fftff4lff ftf ftlfftffff lf fll4fl l4yftf4 n: :f4 fffff fff fll4fl
l4yftf ff :f:fl:4 fl :ll tf: fff f:f fttfff fll4fl fftff4lff lff:f fff
:f:fl:4fftff4lf f::ffe4
nl:fff:ff
nl:fff:ff ftf fl4ffff:f :fftf fl:ef tff:ff4 oll tf: ttffff f tfffel:l:4
:f4ff tl:fff:f :fff fff tl:ff "f::ltf4 Tff :f4f:f tl:ff:ffl:f flt f
tl:fff:f fff:ffffft ftf ff4f ff fftff4lf fff:ffffftf4
tl:ff ff ; 4444
s tl:fff:f tf::lf 4f tff:fff fftllff fffff:4f:f lt 4f tfefftlftff4
Tff ftlff tllff ftf ff4f ff ffff lf fftff4lff fetfff fff fftf ffff tl:ff
"f::ltf ff fl:f:f tfslftff4
effftflf
s lffftfl ff f::fff:f ffff tf: tfftfff:f f ffeff ffllf f: fff fllttf tlff4 s
lffftfl ff f ffllf ffff ff feftfffff ff fffflf tfffft fff: ff fftff4lfef ffllf lt
fff tffllf lf f: feftffffl:4 fltf ff fff :l44ft 44 lt fff fftf:f "ftffff""4
nl:fff:ff f:f sftff4lff ftf 4ff:f:ffll :f4ff ffff tf: ff"f fff flftf lf f
lffftfl4 Tfftf ftf fllll:f:f f:fff lf lffftflf f: Jffffttfff :
sttf: effftflf
elllff: effftflf
ellfff:feflf:f effftflf
n:fffftf
u4yftf effftflf
fftf:f effftflf
Page 4 Values, Variables and Literals
7/12/2013 3:19:45 AM http://prtkcse.byethost31.com/vvl.htm
sssss ssssssss
s: fttf: lffftfl ff f lfff lf ;ftl lt 4ltf feftffffl:f4 fftf lf :fftf tfftfff:ff
f: fttf: flf4f:f4 f:tllfff f: fslftf 4tft"fff4 cff: :ll ttffff f: fttf:
lff:f f: fttf: lffftfl4 ff ff f:fffflf;ff :fff fff ffftfffff ffllff ff fff flf4f:ff
f:f fff lf:fff ff fff fl fff :l44ft lf ftfl4f:ff ffftfffff4
Tff fllll:f:f fef4flf ttfffff f: fttf: flftff :fff 4 flf4f:ff :
fft flftff ; ;"4f: olt""4"el:fl:"4";flff";;
4l: ff :ll :f:f fl fttfff f:: fttf: flf4f:f fff: :ll ffff fl ffftff: f:ffe
:l44ft :fftf ffftff ftl4 .4 ef"f ff :ll :f:f fl fttfff fftff flf4f:f fff: :ll
:lllf :tfff flftff;.; f:f fl l:4
slfl4 :ll fl:ef ffff fl ffftff: ffft: flf4f:f lf fttf:4 nf :ll flf f:l tl44ff
f: f tl:4 fff fttf: ff ttffff :fff l:ffff:ff flt fff l:ffftfffff flf4f:f4 elt
fef4flf4
fft flftff ; ;"el:fl:"44";flff";;
Tff f4lff fttf: tl:fff:f 4 flf4f:ff :fff l:f flf4f:f ff l:ffff:ff4 elf fff
tl44ff ff fff f:f lf fff fttf: :fll 4f ff:ltff4 elt fef4flf4
fft flftff ; ;"el:fl:"4"4f: olt""44;;
Tff f4lff fttf: tl:fff:f ; flf4f:ff ff fff tl44ff ff fff f:f ftf ff:ltff4
sssssss ssssssss
Tff elllff: f:ff fff f:l lffftfl ffllff : ftlf lt fflff4 f:f :ll ":l: ftfff:
:fll :fff fff: ftf4
ssssssssssssss ssssssss
s ellfff:feflf:f effftfl tf: ffff fllll:f:f fftff:
4e s fftf4fl f:fffft :fftf tf: 4f fff:ff
;e s fftf4fl flf:f e"4"e
4e s ftftffl: ef:lffft fftf4fl :l44ft
4e s: fefl:f:f
fl4f fef4flff lf fllfff:feflf:f lffftflf ftf 44444 e;4;044 ee;4; 0 4.
44
e4
Page 5 Values, Variables and Literals
7/12/2013 3:19:45 AM http://prtkcse.byethost31.com/vvl.htm
044fe4; e044 0 4.
e4;
e4
ssssssss
n:fffftf ftf :l44ftf :fffllf f:: ftftffl: fftf4 n:fffftf tf: 4f feftfffff f:
fftf4fle4fff 4.e4 ffeffftf4fle4fff 40e4 f:f ltffle4fff .e4
fe ;ftf4fl f:fffft lffftfl tl:fffff lf f ffslf:tf lf ffffff :fffllf f
lffff:f . e;ftle4
ffe effff:f . e;ftle l: f: f:fffft lffftfl f:fftffff ff ff f: utffl4 utffl
f:fffftf tf: f:tllff l:l: fff ffffff .e44
fffe effff:f .e lt .0 f:ffftfff ffeffftf4fl :fftf tf: f:tllff fff ffffff .e4
f:f fff lfffftf fef lt see4
ssssss ssssssss
s: l4yftf lffftfl ff f tl44f fffftffff lfff lf :f4f ffllf ffftf :tfffff f:
tltl: 4tftff4 u4yftf lffftflf ftf lfff ff f 4ff:f lf f:tfffllfff:f ffff4
f:tllff:f ff f: fff: fft"fff fl 4f:f4f;f fff lff lf fllf4l fftff4lff4 s:
fef4flf lf u4yftf effftfl ff :
fft fflff:f ; {
:f4f: ""tffff" ffft4f"4
tlll: 4.044
4tf:tf: "nf0"
};
nf ff ftfff: 4ltf ff4flft fl fftltfltf f: n f:f tlfff f: nnneJfff4
oll tf: flfl fff 4ffflff lt fl:tffl:f f: fff u4yftf effftfl4 elt fef4flf4
fft fflff:f ; {
:f4f: ""tffff" ffft4f"4
tlll: 4.044
4tf:tf: "nf0"
fff:f4f: fl:tffl:ee{
tfflt: ffff4:f4f;
}
};
Page 6 Values, Variables and Literals
7/12/2013 3:19:45 AM http://prtkcse.byethost31.com/vvl.htm
4lff fff lff lf ffff "f::ltf4 nf tffftf fl fff tlttf:f l4yftf4
ssssss ssssssss
s fftf:f lffftfl ff ;ftl lt 4ltf tfftftfftf f:tllfff f: fll4lf e"e lt ff:flf eee
sllffffl: 4ft"f4 s fftf:f 4lff 4f fflf4ffff 4: sllffffl: 4ft"f lf fff ff4f
f:ff; f4f4 ffffft 4lff ff:flf sllffffl: 4ft"f lt 4lff fll4lf sllffffl: 4ft"f4
0ef4flff lf fftf:f effftflf ftf ""tffff""4 ef4tfe fft4
4l:4 flfflff :ll :f:f fl lff f fftf:f :fftf fffflf tl:fff:f fll4lf sllffffl:
4ft"f4 fff: :ll :lllf ftl4f4l: fl fl4ffff:f lf"f ffff :
fft f4t ; ";f ffff ffff ":ll ftf f fft: 4ff 4l:" f:f ff :ff f:ft:";
Tff f4lff f::ffe :l:ef :lt" 4ftflff fff 4l4f:f :ll flftf fff fftl:f "
4ft"4 ff ff"ff ff fff f:f lf fff fftf:f4 Tl 4f"f ff :lt"4 :ll ffff fl lff
:fff ff ff tfllff ff 0ftfff:f nfftftfft e)e4 elt fef4flf4
fft f4t ; ";f ffff ffff )":ll ftf f fft: 4ff 4l:)" f:f ff :ff f:ft:";
s:f :l: ff :fll :lt" fftfftfl:4 Tfftf ftf fl4f ffftffl tfftftfftf flfl :fftf
:ll :lllf lf"f fl lff4 Tffff ftf :
Page 2 Values, Variables and Literals
7/12/2013 3:20:02 AM http://prtkcse.byethost31.com/vvl.htm
ooo ooo ooo oooooooooo ooo oooooooooooo ooooooo oo ooooooo ooooooo oo
oooooooo ooo oooo ooo,ooo ooooooooooo,, ooo o,ooooo,
ooo , ; ;;;;;
, ; ooooooooo,o;
; ; , ; ;;;
, ; , ; ;;;
.oo ooooo o. ; .ooo ,o ;;;; .oooooo ooo ooooo o. , .ooo ,o ..,
soooo,ooo
soooo,ooo ooo oo,ooooo oooo ooo ooooooo oooooo, oo oo yooo o oooo o. o ooooo,
oooooooo .oooo o ooooo oo oooooo, .oo ooooo o. ooo ooooo,ooo, oooooo
oooooo.oooo, ooo.ooo oo ooooooo ooooo, oo oooo ooooo .ooo o oooooo, ooooooooooo_
o, oo oooooooso oooo ooo oo,oosoooo oooooooooo ooo oooo ,o oooooo, sooosooooo oo
oooo.ooooooooo oo .ooo oooo oo oooo .ooo ,oo oooo ooooo,ooo,
sssssssss sssssssss
.oooo ooo ; .o,o o. ooooooooo ooooo,ooo :
;o e, ooooo ooo ooo .o,.ooo, ooo o,ooooo, ooo , ; ;;, .ooo ooo ,o oooo oo
ooooooo ,ooo ooooo ooo ooo,oo ooooo,ooo,
;o e, ooooo, ooooooooo o ooooo, ooo o,ooooo, , ; ;;, .ooo oo.o,o oooooooo o
ooo,oo ooooo,
oo o ooooo ooooo, ooo ooooo,oo .ooo ,o ooooo oo ooo oooo oooo ooo ,ooo. ooooooo
.ooooo, ooo o,ooooo :
o.oooooo{
ooo , ; ;;
}
ooooooo,oooo,o;
.oo ooooo o. , .ooo ,o ooooooo oo ; ,oooooo oo oo ooo ooooo oo ooo o. ,ooo.,
oo.ooo oo oo ooooo oo ooo oooo oo .oooo ooo o. ,ooo. ooooooo,
s ooooo,oo oooooooo ooooo o ooo .o,.ooo .ooo oo ooooooo ooooo ooooo.ooo ooo
ooo ooooo oooo.oooo, .oo oooo.oooo ooooo ,oooooo oo .oooo .ooo oooo oo
,oooooo ooooo,o, cooo oooooooooo o oooo ooooo, oo ,oooooo o . oo ooooooo
ooooo,oo ooo oo .oooo oo ,oooooo ooooo,oo,
uoo ooooooooooo oo ooooo,ooo .ooo ooooo ooooooooooo ooooooooo oo oooo ,oo
ooo oo.oo oo o ooooo,oo oooooooo ooooo, .oooooo ooooooo oo o,ooooooo, .ooo
Page 3 Values, Variables and Literals
7/12/2013 3:20:18 AM http://prtkcse.byethost31.com/vvl.htm
sssssss ss sssss ss gssssssg: :s sgs :s::ssssg ss:s ss:: ss:s :
sssss:s::sg;;;;
; ; ;;;
t:sgstgg ; ss :ss:s:s: :sss: tts ss ss:: s:sss ;;: ts sst sss: s:t ; ss gsssss: ss
sgs sss:
.ts sgs .s:sst:ss sgssg s:ss.s ssssss:s.s: .ss ss:: :sst:s ts:s:sss::
.:sts: .s:sst:ss s:s sgsss .s:sst:ss sgssg s:s :ss:s:s: stsss:s s: s :tssssss:
.:sts: .s:sst:ss s:s s:sss:ssss s: g:sts: stlsss: ts sst ssgss sgs g:sts:
stlsss ss sss:sst ss .st sss sss ss: ssssss g:sts: .s:sst:ss tsssg sgs
sss:ss:.s:sst:s s.sss;:
sssssssss
sssssssss s:s ss,ssgssg sgssg :ss.s sgssgs: ,st sss s:ssss s :ss:,ss:.t
ss,s: ssssssss sssg sgs sssss ss.ss::: ags ss,ssg sss.sssssss :s: s
ssssssss s:ssss:ss: s:s ss,s ss .s:sst:s s:ssss:ss:s:
sssss ss ; 4:;4
t ssssssss ssssss ts sgssgs: sg:stgg ssssgs,sss s: ts :s,:ss:s:s::
ags sssss :t:ss s:s ss,s ss sgss s: .s:sst:ss s;ssss sgs :sss sgss sssss
ss.ss:: ss s:ss.s :s.ts:s::
ssss:s:s
t :sss:s: ss ss.sgssg sgss sss :ss:sssss s :s;s: .s:ts ss sgs sst:ss ss:s: t
:sss:s: ss s .s:ts sgss ss s;s:ssss: ss ssss:: :ssgs: sgss ss .s:sst:s.s .s:ts s:
sgs :sst:s s: ss s;s:sssssst stsg ss sgs st,ts: ;; s: sgs ss:ssg .s:sssss.:
sssssssss ss: as:sst:ss s:s ,sssssg:t: ss,ss sgss sss ssss sgs s:sss s: s
:sss:s:: ags:s s:s :s::ssssg s.sss s: :sss:s:s ss :s.s:s:sss :
t::s. ssss:s:s
.ss:sss ssss:s:s
s:sssssg,sssss ssss:s:s
tsssgs:s
stlsss ssss:s:s
:s:ssg ssss:s:s
Page 4 Values, Variables and Literals
7/12/2013 3:20:46 AM http://prtkcse.byethost31.com/vvl.htm
sssss ssssssss
ss sssss sssssss ss s ssss ss ssss ss ssss ssssssssssss ssss ss sssss ssssssssss
ss sssss ssssssss sssssssy ss syysss ysssysssy ysss ssy ssssss ss sssss
yssss ss sssss ssssssss ss ss ssssssssssy ssss sss ssssssssy sssyss ss sss ssssssss
ssy sss ssssss ss sss ss sss sysyss ss sssysssss ssssssssyy
:ss sssssssss sssssss sssssss ss sssss ssssss ssss : ssssssss :
sss ssssss ; ;;;ss ;ssy;s;;ssyss;s;;ssss;;;
;ss ss ssy ssss ss ssssss sss sssss sssssss ssss ssy ssss ss sssssss ssyss
sysyss sssss ssssss ssss uy ;sys ss ssy ssss ss ssssss sssss sssssss ssss ssy
ssysy sssss ssssss;u; ssy ss ssy
sssss ssy yssss ssss ss sssssss sssss sssssss ss sssssy ss ssy sys sss ssssss
ss s ssss sss sssss ss ssssss ssss ysysssssy sss sss ysssssssssy sssssssy rss
ssssssss
sss ssssss ; ;;;ssyss;ss;;ssss;;;
:ss sysss sssss ssssssss : ssssssss ssss sss sssssss ss ysysssssyy eys sss
ssssss ss sss ssy ss sss sssss ssss ys ssssssyy rss ssssssss
sss ssssss ; ;;;ssyss;s;;ss ;ssy;ss;;
:ss sysss sssss ssssssss . ssssssss ss sss ssssss ss sss ssy sss ssssssyy
sssssss ssssssss
:ss essssss ssss sss sss sssssss sssyss : ssys ss ssssss ssy ssy ysss ssssss
ssss ssss ssss sssy
ssssssssssssss ssssssss
s rsssssss:sssss ;ssssss sss ssss sssssssss sssss:
dddddddd s yssssss sssssss sssss sss ys sssssy
dddddd.d s yssssss sssss );y;d
dddddd:d s ssssssss )sssssss yssssss sysyss
ddddddtd ss ssssssss
0sss ssssssss ss ssssssss:sssss ssssssss sss :ydts :0y.0dt ):0y. 0 du
dt
ds
Page 5 Values, Variables and Literals
7/12/2013 3:20:59 AM http://prtkcse.byethost31.com/vvl.htm
0000000 0000 0 00
000
.0
ssssssss
nnn0n0nn nn0 nnnn0nn nnnnnnn nnn nnnnnnnn nnnn0 nnn0n0nn nnn n0 0nnn0nn0n nn
n0nnnn.0nnn0 00.. n0nnn0nnnn.0nnn0 00.. nnn nnnn.0nnn0 ..0
aaaaaan. a0nnnn. nnn0n0n .nn0nn. nnnnnnnn nn n n0an0nn0 nn nnnnnn nnnnnnn n
.0nnnnn 0 0.0nn.0
aaaaann. l0nnnnn 0 0.0nn. nn nn nnn0n0n .nn0nn. nnnnnnn0n nn nn nn lnnn.0 lnnn.
nnn0n0nn nnn nnn.nn0 nn.n nn0 nnnnnn 00.0
aaaannn. l0nnnnn 0n nn 00 nnnnnnn0n n0nnn0nnnn. nnnnn nnn nnn.nn0 nn0 nnnnnn 000
nnn nn0 .0nn0nn n0n nn .0.0
ssssss ssssssss
.n nnn0nn .nn0nn. nn n nnnnn n0nnnnn0n .nnn nn nnn0 nn.n0 nnnnn nnnnn0n nn
nnn.n nnnn0n0 lnn0nn .nn0nn.n nn0 nn0n nn n n0nnn nn 0nnnnnn.nnnnn nnnn.
0nn.nnnnn nn nn nnnn nnnnnn0 nn nnnnnn.0 nn0 nn0 nn n.nnn. nnnnnn.0n0 .n
0nnnn.0 nn lnn0nn lnn0nn. nn :
nnn nnnn0nn { {
aaaannn0: ,,nnn00n ,nnnnn,.
aaaann..: ,000.
aaaannnnnn: ,",",
;;
nn nn nn0nnn nnnn nnnn.nn nn nnnnnnnn0 nn " nnn n.nnn nn "....nnn0
,nn nnn n.nn nnn n0nnnnn nn nnnnnnnnn nn nn0 lnn0nn lnn0nn.0 .nn 0nnnn.0.
nnn nnnn0nn { {
aaaannn0: ,,nnn00n ,nnnnn,.
aaaann..: ,000.
aaaannnnnn: ,",",
aaaan0nnnn0: nnnnnnnn0.{
aaaaaaaan0nnnn nnnn0nnn0;
aaaaaaaa;
;;
Page 6 Values, Variables and Literals
7/12/2013 3:21:31 AM http://prtkcse.byethost31.com/vvl.htm
ffff fff fff ff ffsf .f..f... .f .fff.f ff fff .f..f.f f..f.f.
ssssss ssssssss
) ff.s.) )sff.)) sf )f.f f. )f.f .f).).ff.f f..)fff. s. .ff.)f ))) f. fs.))f )))
efff)fsf. ))..f. ) ff.s.) )fff .f .f)s)sff. .. efff)fsf. ))..f ff fff f))f
f..f. s.f. fsfff. .fff fs.))f efff)fsf. ))..f f. .fff .ff.)f efff)fsf. ))..f.
..)).)ff ff .f.s.) .sff.))f ).f )..)fff.). ))...) ff..
ff.. ff..fff .ff .).f ff fff ) ff.s.) .fs.f sfff)f .f.f)s.f .ff.)f efff)fsf.
))..f. fff. .ff .ff). ..f.).). .f ff)fffs.) )s.f ffsf :
;). ).. ; );f f)s. ff)f ).ff ).f ) ;f.. .). .f.) ).. ff .)f ).)..).
"ff ).f;f f..f). .f.)f .f.. .f.)fff fff )f)f.f .ff .)).f fff ff.f.. )
))... sf f).ff )f fff f.. ff fff ff.s.). "f )).f sf .f... .ff f);f ff fff
.f)f sf sf .)))f. )f .f.).s.) )f).).ff. ))). ,f. f.)).)f.
;). ).. ; );f f)s. ff)f )).ff ).f ) ;f.. .). .f.)) ).. ff .)f ).)..).
).. .f. sf .s)) .f.. .f.ff.f).. "ff.f ).f ff)f f.f.s)) .f).).ff.f ))ff .fs.f
.ff .ff). )s.f ff fff. "ffff ).f :
Page 1 JavaScript and HTML
7/12/2013 10:29:46 PM http://prtkcse.byethost31.com/eo.htm
HD|E
Save thIs page as pdf
J
avaScrIpt
T
utorIal
ExpressIons
An expressIon Is a pIece of code that gIves you a value. There are two types
of expressIons. Those who assIgn a value to a varIable and those who don't.
For example, x = 7 belongs to fIrst type and just J + 4 belongs to second type.
CategorIes of ExpressIons
1) ArIthmetIc ExpressIon : evaluates to a number.
2) StrIng ExpressIon : evaluates to a strIng.
J) LogIcal ExpressIon : evaluates to true or false.
4) Dbject ExpressIon : evaluates to an object.
Dperators
Dperators are used to manIpulate values. JavaScrIpt supports both bInary and
unary operators and one ternary operator called condItIonal operator.
A 8Inary Dperator requIres two operands, one before the operator and the
one after :
rrrrrrr rrrrrrrr rrrrrrrr
For example, 2+5, 2*5 etc.
A Unary Dperator requIres a sIngle operand, eIther before or after the
operator :
rrrrrrrr rrrrrrr or rrrrrrr rrrrrrrr
For example, y++(post Incrementor), ++y(pre Incrementor) etc.
Page 2 JavaScript and HTML
7/12/2013 10:29:46 PM http://prtkcse.byethost31.com/eo.htm
CategorIes of Dperators
1) AssIgnment Dperator
2) ComparIson Dperators
J) ArIthmetIc Dperators
4) 8ItwIse Dperators
5) LogIcal Dperators
6) StrIng Dperators
7) SpecIal Dperators
rrrrrrrrrr rrrrrrrr
An AssIgnment operator assIgn values to Its left operand based on the value
of Its rIght operand. That Is, x = y assIgns the value of y to x. There are some
shorthands for assIgnment operators. The below table lIsts them.
srrrrrrrrr rrrrrrrrr
The ComparIson operator compares Its operands and returns a logIcal value.
The operands can be anythIng. f the operands are not of same type then
JavaScrIpt attempts to convert them to an approprIate type for comparIson.
The sole exceptIon to thIs rule are the === and !== operators.
For example, var var1 = J, var2 = 4; then the followIng table lIsts results of
varIous comparIson operators:
Page 3 JavaScript and HTML
7/12/2013 10:29:46 PM http://prtkcse.byethost31.com/eo.htm
rrrrsrrrrs rrrrrrrrr
The ArIthmetIc operators take theIr operand as numerIcal values and return
a sIngle numerIcal value. The standard ArIthmetIc operators are AddItIon(+),
SubtractIon(), |ultIplIcatIon(*) and 0IvIsIon(/). n addItIon to these,
JavaScrIpt provIdes followIng ArIthmetIc Dperators :
Page 4 JavaScript and HTML
7/12/2013 10:29:46 PM http://prtkcse.byethost31.com/eo.htm
srrsrrr rrrrrrrrr
The 8ItwIse operators treat theIr operands as a set of J2 bIts (bInary). For
example, decImal number 7 has bInary representatIon as 111. They perform
operatIons on these bInary representatIons but return standard JavaScrIpt
numerIcal values. The followIng table summarIzes JavaScrIpt's bItwIse
operators :
srrrsrs rrrrrrrrr
The LogIcal operators are used wIth boolean(logIcal) values; when they are,
they return a boolean value. However, the EE and operators actually
return the value of one of the specIfIed operands, so If these operands are
used wIth non8oolean values, they may return a non8oolean value. The
logIcal operators are descrIbed In the followIng table :
srrrrr rrrrrrrrr
n addItIon to the comparIson operators, whIch can be used on strIng values,
the concatenatIon operator(+) concatenates two strIng values together,
returnIng another strIng. For example, Prateek + Sharma returns Prateek
Sharma.
Page 5 JavaScript and HTML
7/12/2013 10:29:46 PM http://prtkcse.byethost31.com/eo.htm
srrsrrs rrrrrrrrr
JavaScrIpt provIdes the followIng specIal operators :
) CondItIonal Dperator
) Comma Dperator
) delete
7) In
7) Instanceof
7) new
7) thIs
7) typeof
X) voId
srrrrrrrrrs rrrrrrrr
The CondItIonal operator Is the only JavaScrIpt operator that takes J
operands. The operator evaluates the condItIon and based on that return one
of the two values. The syntax Is :
2rrr2r2rr 2 2r22 2 2r22
f condItIon Is true, the operator has the value of val1, else val2. For
example,
var status = (age=18) : adult : mInor;
srrrr rrrrrrrr
The Comma operator (,) sImply evaluates both of Its operands and returns
the value of the second operand. ThIs operator Is prImarIly used InsIde a for
loop, to allow multIple varIables to be updated each tIme through the loop.
For example,
)rr)2rr 2 ) ))) ) ))2 ))))2)))))))
rrsrrr
The delete operator deletes an object, an object's property, or an element
at a specIfIed Index In an array. The syntax Is :
delete objectName;
delete objectName.property;
delete objectName[Index];
delete property; (can be used only wIthIn a wIth statement)
You cannot use delete operator to delete varIables whIch are declared wIth
var keyword.
f the delete operatIon Is successful then It sets the property or element to
Page 6 JavaScript and HTML
7/12/2013 10:29:46 PM http://prtkcse.byethost31.com/eo.htm
be undefIned return true.
When you delete an array element, the array length Is not affected because
the deleted value just becomes undefIned.
rr
The In operator returns true If the specIfIed property Is In specIfIed object.
The syntax Is :
rrrrererrreeeerr 2r re)r2rerer
where propNameDrNumber Is a strIng or numerIc expressIon representIng a
property name or array Index, and objectName Is the name of an object. For
example,
var names = [prateek,john,pattrIck,neal];
If(prateek In names)[do somethIng;]
rrrrrrsrrf
The Instanceof operator returns true If the specIfIed object Is of the
specIfIed object type. The syntax Is :
re)r2rerer 2rerrr2rr) re)r2reerr
For example,
var the0ay = new 0ate;
If(the0ay Instanceof 0ate) [ do somethIng; ]
rrs
t Is used to create an Instance of userdefIned object type or one of the
predefIned object types ,rrre) ,rr2rrr) ,rrr) ,er2r2rr) ,er,r) eeeerr)
re)r2r) gr,ggr) rr grr2r,. For example,
var abc = new Array(17,12,19,22);
rsrr
Use the thIs keyword to refer to the current object. n general, thIs refers to
the callIng object In a method.
For example, there Is a textbox In your webpage lIke :
:rrrr r r:r:rr :rrsrrr :: rrr :: : Input type=text name=age
onchange=valIdate(thIs,18,99);
Page 7 JavaScript and HTML
7/12/2013 10:29:46 PM http://prtkcse.byethost31.com/eo.htm
Now under your scrIpt tags, you would wrIte :
functIon valIdate(obj,lowval,hIghval) [
If((obj.value lowval obj.value hIghval))
alert(nvalId value);
]
alert() creates a wIndow popup whIch dIsplays a message whIch you provIde
as argument.
ClIck the button to see alert wIndow s:rrrr
rfrrrf
The typeof operator Is used to get the data type (returns a strIng) of Its
operand. The operator can be a lIteral or a data structure.
ts syntax Is typeof operand or typeof(operand)
The followIng table summarIzes the possIble values returned by the typeof
operator.
typeof(4+7), returns number
typeof(4 + 7), returns strIng
typeof new 0ate(), returns object
drrr
The voId operator Is used to evaluate a JavaScrIpt expressIon wIthout
returnIng a value. ts syntax Is :
voId expressIon or voId (expressIon)
The followIng code creates a hypertext lInk that does nothIng when the user
clIcks It.
Page 8 JavaScript and HTML
7/12/2013 10:29:46 PM http://prtkcse.byethost31.com/eo.htm
a href=javascrIpt:voId(0)ClIck here to do nothIng/a
voId(0) evaluates to undefIned whIch has no effect.
The followIng code creates a hypertext lInk that submIts a form when the
user clIcks It.
a href=javascrIpt:voId(document.form.submIt())ClIck here to submIta
Dperator Precedence E AssocIatIvIty
Dperator precedence refers to the order In whIch operators are evaluated
when more than one type Is used In an expressIon. For example,
a+b*c=20;
n the aboce expressIon, fIrst multIplIcatIon Is done, then addItIon and then
assIgnment due to theIr respectIve precedence.
Dperator assocIatIvIty refers to the order In whIch operator wIth same
precedence are evaluated when they appear alongsIde one another. There Is
left to rIght and rIght to left assocIatIvIty.
8elow table lIsts precedence and assocIatIvIty of varIous operators :
Page 9 JavaScript and HTML
7/12/2013 10:29:46 PM http://prtkcse.byethost31.com/eo.htm
Page 10 JavaScript and HTML
7/12/2013 10:29:46 PM http://prtkcse.byethost31.com/eo.htm
Top Next PrevIous
Page 1 Functions
7/15/2013 5:26:05 AM http://prtkcse.byethost31.com/Iun.htm
EEEE
ffff ffff ffff ff fff
J
ffffttfff
T
lfltffl
slstfflsf
slstfflsf ftf lsf lf fff .lff f.fltffsf .lflffsf .llt. lf Jffffttfff.
slstfflsf ftf fff lf fffff.fsff sfftf ftf fstllfff fs tltls .tftff. slstfflsf
ftf sf.ff ftltffltff. Tffs ftf lfff fl fftflt. f fff. fsfalt tfflts f
tftllffff ffllf.
nnnnnnnn nnnnnnnnnnnnnnnnnnnnnn
e flstffls ffffsfffls lt fftlftfffls tlsfffff lf fff flstffls .fssltf,
fllllsff .s :
....... Tff sf.f lf fff flstffls.
....... e lfff lf ftfl.fsff fl fff flstffls, fstllfff fs fftfsffffff fsf
fffftffff .s tl..ff.
....... Tff Jffffttfff fffff.fsff ffff ffffsf fff flstffls, fstllfff fs tltls
.tftff, . ..
slt f:f.flf :
nnnnnnnn nn{{{nn{{{{{ {
;;;;;;{{nn{n nn{{{{;nn{{{{;nn{{{{;
}
dtf.fffff fftf.ffftf lf.f sl..ft ftf ffffff .s ffllfo fff ffllf ff ffffff fl
fff flstffls fsf ff fff flstffls tffsfff fff ffllf fffs ffff tffsff ff slf
tfflftfff fll.flls lt fs tfllfsf flstffls.
af sll ffff f slsaftf.fffff ffllf lf.f ettfs lt fss lfftaffffsff l.aftf ff f
fftf.ffft, fsf fff flstffls tffsfff fff l.aftftf ftlfftffff fffs ffff
tffsff ff ffff.lf llfffff fff flstffls. slt f:f.flf :
nnnnnnnn n{{n{{{n{{{{{{nn{ {
;;;;;;n{{{{{{nn;{n;;;;;;;;
}
;{{ ;nn;{nn ; {n{{{; ;;{{n{{;;; {n;;; ;;;;; {{{nn{; ;;;};
; ; ;nn;{nn;{n;;;
n{{n{{{;nn;{nn{;
Page 2 Functions
7/15/2013 5:26:05 AM http://prtkcse.byethost31.com/Iun.htm
; ; ;nn;{nn;{n;;;
Tff ffllf lf : sfll .f .... .lf ffllf lf s sfll .f .....
eslffft tl..lsls lfff flstffls ff eslss.llf flstffls sfftf flffstf tfelftf
fss sf.f. slt f:f.flf,
;{{ ;;n{{{ ; nnnnnnnn{nn{{{{{ {{{nn{n nn{{{{;nn{{{{;};
eslffft fsff lf flstfflsf sll .fs ffff ffftf ftf sftltffff flstfflsf,
flstfflsf sfftf tfll fff.fflfff. mll .lff .f ff.flfft sfff fftfltffl ftlftf.
fs lffft ftlftf..fsf lfsflffff. Efff f lll. lf ff fs Jffffttfff :
;{{ n{nnn{n{; ; nnnnnnnn n{n{n{ {{{nn{n n;; ; ; ; n;n{n{n;;{} ;
Tff f.lff flstffls tffltsf . ff fff ftfl.fsf ff lfff fffs ! !.ftflff .! fsf .!
ftf .lff felfl fl .f, flt fll lffft ffllff ff tfllf s.fft!sa.f. fl flt f:f.flf, ff
sll sfff fl tfltllfff y!, fffs ffstf yy! fl ff sfll .lff fl flff fftf .s
.llffflsfsf y .s fft!.f sfftf sfll ffffs .lff fl flff fftf fsf fl ls. mll sfll
ffsflls fff fff fsfsft ff !y.
llft. fftf fl fff lfff f:f.flf lf fftfltffl
slstffls ftlff
mftff.lff sfftf ftf ffffsff fsffff f flstffls tfsslf .f fttfffff ftl.
fsssfftf llfffff fff flstffls. e flstffls ffffsff fsffff fslffft flstffls
tfs fttfff fll fftff.lff ffffsff fs fff fftfsf flstffls fsf fll fftf.flff ffff
tfs .f fttfffff .s fff fftfsf flstffls.
lllfltff
e tllfltf ff fs fssft flstffls ffff fff fttfff fl fff llfft flstfflstf
fftff.lffaftlff tfffs. Tff tllfltf fff fftff ftlff tfffsf: ff fff fttfff fl fff
lss ftlff, ff fff fttfff fl fff llfft flstffls ffftff.lff fsf ff fff fttfff fl
fff fll.fl fftff.lff. :flls ff f .ffft f:f.flf lf f tllfltf :
nnnnnnnn ;{n{{nn{{{;;n{{{{{
;;;;;;;{{ nnn{n ; ;;nn{ n{{{ n; ;;
;;;;;;nnnnnnnn nnnn{n{{{
;;;;;;;;;;;;{{nn{n nnn{n ; nn{{{ ; ; ; ; ;n{{{;
;;;;;;;;;;;;}
;;;;;;{{nn{n nnnn{n{{;
}
;{n{{;;{{n{{;;;;;{{{{{;{;
etfl.fsff E.aftf
Tff ftfl.fsff lf f flstffls ftf .ffsfffsff fs fs fttfsalf.f l.aftf. affffs f
Page 3 Functions
7/15/2013 5:26:05 AM http://prtkcse.byethost31.com/Iun.htm
flstffls sll tfs ffftfff fff ftfl.fsff ffffff fl ff ff fllllsf :
{{{n{{nn;]n]
sfftf n ff fff fsff: sl..ft lf ftfl.fsf ffftffsf ftl. .. fl fff fftff
ftfl.fsf fff fsff: sl. ff .. mll tfs lff {{{n{{nn;;;{n{n{ fl ffsf fff
flffl sl..ft lf ftfl.fsff ffffff fl f flstffls. slt f:f.flf,
nnnnnnnn nnnn{n{;{{{{{nn{{ {
;;;;;;;{{ {{;n;n ; ;;;
;;;;;;nn{{;{{ n;;; n;{{{n{{nn;;;{n{n{; n;;{ {
;;;;;;;;;;;;{{;n;n ;; {{{n{{nn;]n] ; ;{{{{{nn{; ;;;;;;}
;;;;;;{{nn{n {{;n;n; }
af fff.f ffff ffftf ff lsls lsf ftfl.fsf fs fff f.lff flstffls sfftf ff
sf.ff ff fffftfflt. :lf ff ff alff ftfl.fsfr.r. mll tfs ftlffff fss sl..ft
lf ftfl.fsff sfftf sfll .f ffltff ff fl.ffelfsf fttfs fsfftff. etfl.fsfr.r
fsfftffff fff fsff lf fffftfflt sll sfssf lff fl tlstff sf.ff. Tffff sfs fs
fff flt lllf fff f fsffflfrff ff . fsf slf . .ftlfff fff sf.ff flt
tlstfffsfffls ffftff ftl. ftfl.fsffr.r. slt f:f.flf, ff sll slllf lff :
nnnn{n{; ;;;;{{n{{;;;;){n;n{;;;)n{n;;;;n{nn;{
fffs ff slllf tfflts dtffff. Jft.ff Jlfs ff.ls.
snnsnnnnns nnnnnnnns
......fffl
......ffsfsfff
......ffNfN
......fftffasf fsf fftffsllff
......Nl..ft fsf fftfsf
......fstlfftsa, fftlfftsa, fstlfftsall.flsfsf, fsf fftlfftsall.flsfsf
nlnn
Tff fffl!f flstffls fffllffff lt f:ftlfff fs ftfl.fsf. af fff ftfl.fsf ff fs
f:ftffffls, fffl!f f:ftlfff fff f:ftffffls. af fff ftfl.fsf ff lsf lt .ltf
Jffffttfff fffff.fsff, fffl!f f:ftlfff fff fffff.fsff.
slt f:f.flf,
{;{;{;;;;;;;2;;nnn{{nn;{{nn{{;;;{;{; 22{{nn{n; ;;
{;{;{;;;{; 22 {{nn{n; 2
nsnnnnnn
Page 4 Functions
7/15/2013 5:26:05 AM http://prtkcse.byethost31.com/Iun.htm
af tfft.f fff ftfl.fsf fl fffft.fsf sffffft ff ff f ffsfff sl..ft. Tff
fssff: ff :
n;)nnnn{{nn{{{{{
sfftf fff nn{{{{ ff fff sl..ft fl fffllfff. af fff ftfl.fsf ff fl.ffffsf
lffft fffs sl..ft fffs ffff .ffflf tffltsf n{;;{;
nsNnN
NfN fffsff flt Nlf f Nl..ft. fl ffNfN flstffls fffft.fsff ff fff ftfl.fsf ff
Nlf f Nl..ft. af tffltsf ftlf ff fff ftfl.fsf ff Nlf f Nl..ft. slt f:f.flf,
;{{ n{;n ; ;;{nn{nn;;;
nn{n;}{n{n{;n{{ { ;n ;n{{n{nn{; }
tnnsntnn nns tnnsnnnnnn
Tffff fsl flstfflsf tffltsf f sl.ftft ffllf sffs ffffs f fftfsf ff fs
ftfl.fsf. Tff fssff: lf fftffsllff ff :
{{{;{);n{n{;n{{;
af ffff.fff fl tfflts f fllfffsfaflfsf sl..ft. af ff fstllsfftf f tfftftfft
lffft fffs f fffs !, lt af, f sl.ftfl !.a,f, f fftf.fl flfsf, lt fs f:flsfsf,
fffs ff tffltsf fff ffllf lf fl ffff flfsf fsf ffsltff ffff tfftftfft fsf fll
flttffffsf tfftftfftf. af fff fftff tfftftfft tfsslf .f tlsfftfff fl f
sl..ft, ff tffltsf NfN.
Tff fssff: lf fftffasf ff :
{{{;{;nn{;n{; ]{{;n;]{;
af ffff.fff fl tlsfftf fff fftfsf fsfl fff fsfffft lf tfff: !.ffff ffftfffff .s
fff {{;n; lffflsfl ftfl.fsf. af fff tfff: ff .., ff tlsfftff fff fftfsf fl
fftf.fl fsfffft. sfff: . .ffsf ltffl fsf fl ls.
Nnssnn nns snnnns nnnnnnnns
Tffff flstfflsf lff sll tlsfftf fs l.aftf fl f sl..ft lt f fftfsf. slt
f:f.flf,
;{{ n{{;{n;
n{{;{n ; }n{{{{{n{{;{n{;
n{{;{n ; ;n{nn{{n{{;{n{;
sfftf n{{;{n ff fs l.aftf tffftfstf.
Tff fllllsfsf f:f.flf tlsfftff fff e{n{ l.aftf fl f tffff.lf fftfsf. ;{{ e
; n{{ e{n{{2;;;12;;;;;1{; 22 {n;;n;{nnn;; ;nnn{ ;11;2;;2;;
;{{ ; ; ;n{nn{{e{;
af sll ftfsf :, fffs ff sfll tfflts Tfl elf .. .3:.3:y. tTl,.3.. .,..
Page 5 Functions
7/15/2013 5:26:05 AM http://prtkcse.byethost31.com/Iun.htm
Tff fllllsfsf f:f.flf tlsfftff fff fftfsf fl Nl..ft l.aftf.
;{{ ;n{ ; ;;1;;
;{{ nn{ ; }n{{{{{;n{{;
nsnntn nns nnnsnntn nnnnnnnns ))ssnnnnns nsnln )nlnsnnntn ))))
Tff {;n{{{ fsf nn{;n{{{ flstfflsf lff sll fstlff fsf fftlff fftfsff. Tff
{;n{{{ flstffls tffltsf fff ff:ffftf.fl fstlffsf lf fs ftfl.fsf fs fff afE
efffs tfftftfft fff. Tff nn{;n{{{ flstffls tffltsf fff eflaa fftfsf flt fff
ffftfffff ff:ffftf.fl fstlffsf ffllf. Tff fssff: lf fffff flstfflsf ff :
{;n{{{{;n{nn{{;
nn{;n{{{{;n{nn{{;
Tff fftfff fsf lsfftfff flstfflsf fl slf slt. ftlfftls flt slsaeflaa
tfftftfftf fsf ffff .ffs ffftftffff. as Jffffttfff ..3 fsf lffft, lff
dddddddddd dddddddddd ddddddddddddddddddd ddd
dddddddddddddddddd. Tffff flstfflsf ftf slf ffff f.fltffsf fl sll fl sll
tfs f.ff fff..
Page 1 Functions
7/17/2013 7:01:38 AM http://prtkcse.byethost31.com/st.htm
ffff ffff ffff ff fff
J
ffffttfff
T
lfltffl
fffff)f)ff ))l)ftll )ll))
Tffff f)tllff rrr rrrrr rrrrrrr rrrrrr rrr fftn nll ffff fff) fff) f)
fftfllf fff)flff f) ffff flfltffl f)f fll )lff ff ffff)f )ltf fffftff)tf lf
fff) f) lffft ftlftf))f)f lf)flffff lfhf )h)hhn flh h )fll )lf ffff )ltf
fftfff l) ffff flfft f)f ff fll lfhf fff) fll tf) fltflf fhff fff)n
)l)ffffl)fl fffff)f)ff
l tl)ffffl)fl fffff)f)f ff f fff lf tl))f)ff ffff ffftlfff ff f llfftfl
tl)ffffl) ff ftlfn Jffffttfff flffltff f)l fffff lf tl)ffffl)fl fffff)f)ff :
eeeeeeeee f)f ehehhh
ffnnnflff fffff)f)f
nll fll ftf ff)flfft )fff fffff fffff)f)ffn hf fff llfftfl tl)ffffl) ff ftlfh
fff) ee fllth ff ffftlfffh lffft)fff eeee fllth ff ffftlfffn
ee )h)))ehe)))
111111eh1he1e)h11
eeee
111111eh1he1e)h12
)l)ffffl) tf) ff f)f ffftffffl) ffff tf) fffllfff fl ftlf lt fflffn Tff
fllll)f)f ffllff fffllffff fl fflff:
eeeeeefflff
eeeeeel)ffff)ff
eeeeee)lll
eeeeee0
eeeeeeNfN
eeeeeefff f)fff fftf)f)) ))
Page 2 Functions
7/17/2013 7:01:38 AM http://prtkcse.byethost31.com/st.htm
f)fftf fffff)f)f
l ehehhh fffff)f)f flll)f f ftlftf) fl fffllfff f) ffftffffl) f)f ffff)ff
fl )fftf fff ffftffffl)ef ffllf fl f tfff lfffln hf f )fftf ff fll)fh fff
ftlftf) ffftlfff fff fffltfffff fffff)f)fn
ehehhh )e{{{eeee))) {
111h1ee e1:ee11:
111111eh1he1e)he11;
111111:{e1;;
111h1ee e1:ee12:
111111eh1he1e)he12;
111111:{e1;;
111eee
111)ee1;eh: 111111eh1he1e)he1)ee;
111111:{e1;;
}
hf ffftf ff )l )fftff)f tfff fff) fff ftlftf) ffftlfff )ee1;eh fllthn
k{e1; tl))f)f ff )ftfffftf fffft ffftf fllth fl ftfff)f ffllf)fffl
ffftlffl) lf fll tffffn
)lt fff)flf :
ehehhh )e{;eh) {
111h1ee ""{1)"ee":
111111))h;1e)heh{ehe)""{1)"ee");
111111:{e1;;
111h1ee ""{{eee":
111111))h;1e)heh{ehe)""{{eee");
111111:{e1;;
111h1ee ""1)")ee":
111111))h;1e)heh{ehe)""1)")ee");
111111:{e1;;
111)ee1;eh:
111111))h;1e)heh{ehe)";) e{;eh ee eeeehhe)");
111111:{e1;;
}
Page 3 Functions
7/17/2013 7:01:38 AM http://prtkcse.byethost31.com/st.htm
sllf fffff)f)ff
l lllf ff f fff lf fffff)f)ff ffff ftf ffftlfff tffffffflf l)ffl f ffftfffff
tl)ffffl) ff )ffn
flt fffff)f)f
Aftffff fff )lff flfllft lllf tlflff )fftf fll lff ffff)fffflfn l e){ lllf
tffffff l)ffl f ffftfffff tl)ffffl) fffllffff fl fflffn
e){ ))e)ehe1e){{{eeee)));)h)))ehe)));)e)h{e1e)h){{{eeee))))
111111{eh1he1e)he}
flnnn)fflf fffff)f)f
Tff ))eeehheee fffff)f)ff tffffff fffflf l)ffl f ffftfffff tl)ffffl)
fffllffff fl fflffn
))
111eh1he1e)h
hheee )h)))ehe)));
Tff l)lflfl fff)f ffllf ))eeehheee ff eh1he1e)h ffftlfff l)tf fffltf fff
tl)ffffl) ff tffthffn
)fflf fffff)f)f
l hheee fffff)f)f ffftlfff fff fffff)f)ff ff ll)f ff f ffftfffff tl)ffffl)
fffllffff fl ftlfn
hheee )h)))ehe)))
1111eh1he1e)h
lfffl fffff)f)f
l lfffl ftlfffff f fffff)f)f )fff f) fff)ffffft ffff lfff fll tffft fl ff
flff)fftf f) fllt ftlftf)n )lt ffh fll tf) lff f lfffl fl fff)ffff f lllfn
11{;e1:ee:
hheee )h)))ehe)))
1111eh1he1e)h;
ftffh fffff)f)f
eff fff :{e1; fffff)f)f fl fft)f)fff f lllfh f)fftfh lt f) tl)hl)tffl) )fff
Page 4 Functions
7/17/2013 7:01:38 AM http://prtkcse.byethost31.com/st.htm
f lfffl fffff)f)fn
eeeee eff) fll lff :{e1; )fffllf f lffflh ff fft)f)ffff fff f))ft)lff
f)tllff)f hheee, )),hheee, e){, lt 1111ehehhh f))fffffflf f)f ftf)ffftf
tl)ftll fl fff fllll)f)f fffff)f)fn
eeeee eff) fll lff :{e1; )fff f lffflh ff fft)f)ffff fff ffftfffff lffflff
fffff)f)fn
tl)ff)lf fffff)f)f
Tff h))he);e fffff)f)f tf) ff lfff fl tfffftf f hheee, )),hheee, e){,
){ e1:ee eh1he1e)h eeeeeee eff) fll lff h))he);e )fffllf f lffflh ff
fft)f)ffff fff tlttf)f ffftfffl) lf fff f))ft)lff f)tllff)f hheee, )),
hheee ){ e){ fffff)f)f f)f tl)ff)lff ffftlffl) lf fff lllf )fff fff )fff
ffftfffl)n h) tl)ftfff fl fff :{e1; fffff)f)fh h))he);e flff )lf fft)f)fff
fff ffftlffl) lf lllf f)fftflfn
eeeeeee eff) fll lff h))he);e )fff f lffflh ff ffflfff fl fff lllff)f
fffff)f)f fff)ffffff )fff ffff lfffln
Tff ff)fff lf fff h))he);e fffff)f)f :
eeeeee.n h))he);e
eeeeee.n h))he);e lllll
sfhftf sf)ffllfffl) fffff)f)ff
Jffffttfff lfff fff e){eeee), e){ e1hheeee), f)f hehh fffff)f)ff fl
)f)ffllfff lfhftffn
fltnnnf) fffff)f)f
Tff e){eeee) fffff)f)f ffftffff f ffftfffff fftffflf lfft fll fff ftlfftffff
lf f) lfhftfn )lt fftf fffff)tf ftlfftffh Jffffttfff ffftlfff fff ffftfffff
fffff)f)ffn l e){eeee) fffff)f)f lllhf ff fllll)f:
e){ ){1{e1:ee e) ):{ehh) {
Page 5 Functions
7/17/2013 7:01:38 AM http://prtkcse.byethost31.com/st.htm
1111eh1he1e)he
}
,ff)flfh
e;)hhe)) {{e)h1{{){e{heee)):{,):{;11e) {
1111{1{ {ee;eh ; "";
1111e){ ){1{ e e) ):{) {
11111111{ee;eh ;; ):{;11e ; "e" ; e ; ";" ; ):{)e) ; ";:{ ;;";
}
1111{ee;eh ; ";h{ ;;";
1111{eh;{) {ee;eh;
}
flt fftfnnnf) fffff)f)f
hf ff ff)flft fl e){eeee)h flf ffftffff lfft fff ffllff lf lfhftfef ftlfftffffh
)lf fffft )f)ffn
,ff)flf :
{1{ e;1 ; ;;
{1{ ):{ ; {{{){1: ;,{{){2: 1;,{{){;: 12};
e){ e1hh ){1{ e e) ):{) {
1111e;1 ;; e;
}
{{e)h)e;1);
Tlfeeee Nfffeeee Atfffllf

S-ar putea să vă placă și