style . : style. . , "-" , .. JavaScript, , , , . style, : background-attachment-> backgroundAttachment;
border-bottom-color-> borderBottomColor; font-family ->fontFamily; z-index ->zIndex.
style. style .
cssText | ( STYLE). |
pixelHeight | . |
pixelLeft | . |
pixelTop | . |
pixelWidth | . |
posHeight | , . |
posLeft | . |
posTop | . |
posWidth | . |
style Web-, .
paragraph1.style.fontSize = 7;
:
image1.style.height = "100mm";
image1.style.width = "120mm";
iamge1.style.top = "200px";
image1.style.left = "50px";
, style pixel***, :
image1.style.pixelHeight = 400;
iamge1.style.pixelLeft +=5;
pos***, , .
<IMG src="image1.gif" id="image1" style="height: 100mm; width: 100">
nheight = image1.style.posHeight; //
nwidth = image1.style.posWidth; //
layer
, , layers.
document.layers[2]
document.layers["somelayer"]
, , :
document.layers["outerlayer"].layers["innerlayer"]
layer
above | , (.. z-). , null. |
background | Image, . src . Image. , null. |
below | , (.. z-). , null. |
bgcolor | . |
document | document, . |
Left | . |
name | , NAME. |
pageX | . |
pageY | . |
parentLayer | window, . |
siblingAbove | , (.. z-) . , null. |
siblingBelow | , (.. z-) . , null. |
Src | , . |
Top | . |
visibility | : show , hide , inherit ( ). |
window | window ( frame), . |
X | , left. |
Y | , top. |
zIndex | . . . |
layer
|
|
load({ }, { }) | . , . |
moveAbove({ }) | , . |
moveBelow({ }) | , . |
moveBy({X},{Y}) | X Y . X Y. |
moveTo({X},{Y}) | , X Y. ( ). |
moveToAbsolute({X},{Y}) | , X Y. . |
resizeBy({X},{Y}) | X Y . X Y. |
resizeTo({X},{Y}) | , X Y. |
Document Object Model (DOM)
DOM HTML - - (node).
document - <html>. <html> <head> <body>, , , . HTML :
<!-- pr27: -->
<HTML>
<HEAD>
<TITLE> Overview of the DOM </TITLE>
|
|
</HEAD>
<BODY>
<H1> </H1>
<P>
<b> document </b>
, DOM .
</P>
</BODY>
</HTML>
HEAD TITLE . BODY , . .
(document, , ) , .
nodeName ( ) HTML , , , p ul . nodeName , #text.
nodeType- ( ) 1, 2 3 , , , .
: nodeValue. . null, - .
:
<DIV>
<UL ID="components">
<LI>HTML</LI>
<LI>CSS</LI>
<LI>Javascript</LI>
</UL>
</DIV>
DOM <DIV> <UL>. <LI>(- ). , .
- DOM: parentNode , ; childNodes ; firstChild ; lastChild -; previousSibling , ; nextSibling - , ; attributes ; ownerDocument document, .