0% found this document useful (0 votes)
28 views16 pages

CSS 4th

Uploaded by

ludbesanskruti2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views16 pages

CSS 4th

Uploaded by

ludbesanskruti2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

PAGE No.

DATE

Ceoie
A c oolie a amount of nformation that Persists
et ween serNer side ae|ent -sie. we

brower store thi information at tie

brouwsing: A coohie ontains informati n a astrinE


in t e fom of a name-valwe pairz
sepavatel by semi-colons.
A evsistent coie coohie that i assianed
ex pira t i o n ate
Create Co hie
ocuent -cooie name Val ue
Peritent
Read coehie
Va -e- document cohie;

\nri t e c o o i e
oeument cookie "usesnameTohnSmi+h,
expive : h u , 8 Dec

Path

Perzitent ceokie (Crea te, read, wri te,ele te)


khtml

Zheady
<seript
function wi te()

Var Date()

disetTime (dgetmeC) +(1oo*66o* )).


with (document- myfom)
ocuoentcoohie Name -
Jaluet

unetion rea()

iflocument
docuentwrite("cookiey not foum):
else
document-wite(ocu ment-co kie)

Z/sript
<head

mae morm'' act i o n =


Ente
<inPut t y e "tex t n a e i p e r s on
<inpt tyPe:"R eyet" value:"set Coskie type: butto
oneliek=wit e l ) "
KinPut type: R e y e t vaIue=Ge t Coo kie
type:"button" Oneick " i t e a d c ) "
</formy
K/htm|
PAGE No.

DATE

bet. session eookieK t cohiey


D.fference
PetetCekieg
i)A Persistentcookiei a
)Tt resides
cookie thatt is asziqned
for the lenqhtb of the
expiratin ate
Ses3ion.

)A\so kob,ntansiet
)Also known an
in-enor cookie ookie

)3essioncookie ) t is written to t h e
automatically deleted computer's had isk
Yeaitbeeuntilthe
when tA he u s e y exi t
|ation expiration aate ha been
t h e bvowser
reached then it's eleted

Browserocationobiet
tbe location objectteotáins infomation bout

t he c u r e nt URL
property of the winow ebieet
-)The location object
with: window. locatio
) T e loc ation obiect is accesed
iust loeation.

tml <bediy
winow |locatio bjeet <
<pi : d e m o " K p
Zseript
| e t r i g i n indowlocationoyiqin.
document qeteementByI (demo). inner hT ML: origin
<1scri
DATI

npu t from ser wsame P3

aets executed when t h e pes3word chan e .


cookie. t
ytml

myForm'
Enter We yname
<in put typ e " t e x t"
Passwodi
<input type tex t"
Kipt t e e t t e a " atebmit"onetittoret
PaneI</p

Zseyipt
fumetion store)

Va upas3- documentget elementBTd'pwd


value
o u m e n t . cookie Paswore tpw+
alert (Cookie sto vedln"tdocuient coohie):

</script7

</htmly

Methos of document bjee t


) ae telement B I ) r e t u r n s t he elemet havina the
given i d alue.
) aet ele ments B y N a n o e ) r e turns t e a l l t h e elemens

having t h e 9 v e n Value. na m e

L)aetElements ByTaqnamel): returns all the elements


qiven t a ahaing he

h ) e t Elemerts ByC)aSS Name(O:retuns al the elements


hawina t he aiven class
PAGE No.

DATE

ninow object P°pertiey


veturns the history' ebieet fo t he
window
)?nnevHe ic bt t s et or v e t u r n inmey heiebt f
a in dou's content ar a.

imow' con t e n t a e a
v ) a m e. t sets
wimdo
w) Lenath It return3 the -f f a m ey
window.

vwindow object method


dalert ):Tt isplays a l e t box.
) confirm():Ttispla ialoa boxt hat containy
K a n c e " button
|)pvompt): It lisplays ialo t hat Pompts
the visitox 1nPut.

o e n C ) I t opens
)lose): I t elo e
t he c u r r e n t wwiow.

c r e a t e Popu tt create PP-uwinow

) m o v e | o C)
v)nove ByC)
)resi2e
x )reize ByO
xi)scrol|ToC)
x )s r o l |By()
PAGE N
DATE

Winow pem
bello: htim
tm>

Aocumetiwite (" Hello orld *):

L | t m|

Sapletml
Khtm|

Kseipt
var sbi
windowopen(hellß.htnl winowame:
top200, left o0,width= so, heiqht= (oo,
status),
4l3cript>

OPe
<h t
Rclose
ml
sin button

zbody
<button onelich "openl )"open imdolbutton>
Zbutton onelickcloel)"closeWimo <lbutton

<3cript
mywindo
fction Open()
mNimdo w indow.oen Wi"
" w i l t h= 2 0 0 h e i a h tt = lo o"),
muinow docu ment.wviteHello

munNindow.el6ge()

</sevipt
</bdy
htl

s e r o | | 8 y ( ) m e t h d scrolls the documetb

the specified number of pixels.

Suntax win dow.sero|By(xnm,unum)

<he ad
<st yle
body

buttonf
position:fixed
Kbutto fumetionZ

metho
alwinow's le ft
<ooiate
to t he specikied

wwindow. move|o(e,)

<enten ts
changig

unetin pen(ad)

hei a h t = | o o"

p e n ( w w . qooqle co)
vale='" Coqle one|icls ="
Ab u t t o n
) oogle/butto
Zbtton value "Vi dyalankar oncIickoPen

vet edu in') Vilyalankay. </button>

scre||To (
docuent to the pecified coordinate
t serols t he

w ndow.scrolTo ( e p o s , pos
Sta:
he ad
Lstle
body height Sosop*: wid th. soopx,
z/styles
z/head

seroITo(ioo,o):

netion sero | | \ ( )

d.scrol|To (o,o)

<p>Lona Textlp
3cro.. orióntall
Kbut ton ome|ick=scroll H O
</buttoms
)>Keyoll,Vertcall
btto onelik serl
< / b utto n

</h tml
Mutiple wimdous

function sbowc)

for(io,iso, i i t )

+i, top
'|eft'= + a t i d t h 3 o ° ,
height : oo):

clseript
u t ton e Put

SetInterval

Tt repet t a givenfuntion at everygiven


+ime inteual. In this first pavameter is the
funtion to be execute 3econd Paranete
nicatey the \en th of the t i n e - i t e r l between
}eachiexetution

s n t a x n o w s e t I t e r v a l (Funetion, misecos\
< s e i t d e mo"l

Var mVar: e t I t e r v a l (myTimer, I o )


fuction
Va d = ne w DateC),
document actEemnent ByI ( " e m o " ) . i nneHTMML
d t o Locate T mestrinq
eleIterval
t s t o s t e e é w t iongef t e
uhetion speeified
i n t h e e t i t e r ) oe t hod

wino.cleaInteuaal (tierariable)

e b t to onclick " l e arIterv al


(yVáy)3tp< bt

Setyte

Display umbers intext ox s e t t s t e u a l )


html><bdy
z textaea i " t x t " vows-"4o"</text area

Zbut ton oneliek= ' s t a r t c o u n t C ) 3 t o r t< b t n


Zscipt
inteval;

f u c t i o t á t count)

intervaletItèelshowc)"

une tio

doccument qet l e e n t ByT l t xt).vale

<sevipt
-acc essina
ehil wimo, ele men t
var ehillainow window.open(ehilhtnl
AehilindowName);

es Ome frame have


button Othey wil\ isp\ay ima q e

htnl)
Zfameset
<frame s y c = " & t l n a mes a'
hae">
() /fvaeset7it

Z/framest

ehtm>

<formn ac t i o n
metod" post"
2p<a hyef prg"trget 5'>
<input type:button' value"Cick hee">

</body
</h trml

b.ht nl
html> <body

</body</htnl>
changing wi ndo contents
htm |

2seri pt itp.
funetion open(ad)

moanisiwinowopen(ad,"yWindo'",
beight:soo");

</3cript
<<bat to n Value:Gcooale"ocliek = "Pen(
soog lecom)Geooale </buttony
<button value Ni dyalankar"nc)ich"ope
(vpt. eduin')"> Vi yalankar </buttony
<fbody
</h t ml

moe Io C)
ptm |

<body
oPenin()"Open Window
< b t t o n onclick:
</puttoy
onclick moetowin C ) Z tioveTo
Ab utton
K / u t to ny

move by win C ) > Move Bu


< b t t o n on click

<scyipt
mapms
wm uYlo. ) ..
oving ca

’html>
2he ad

Var obË= nul ;


Var aniate
funtion initC)

obi locment.qetele nient:ByI'car")


o b i style. p o 3 i t i o n e l a t ive'
obj.style. left 'Opx:

function startC)

obs. style.left parseTnt(bjstyle: left)

aniate set T i e o t (3tart, 0).

fumetien stopc)

elea Iimeout animate),


obj style left Px

wiinowonload =init,

< /seript
/head
:cav"

<in put Value : ' s t a r t " upeSwttos"


Bselick:tartC)

zinput value "stop/'st p e ' but ton"


nelielk "stop C)
Zlbodyy

You might also like