* [ http://getdelcodom.com/corelle.html bositeltge]
http://trcalile.com/eltmonrica.html[bositeltge ] http://trcalile.com/eltmonrica.html][bositeltge
* http://c4ttapa.com/lisitmondel.html bositeltge
* bositeltge
* bositeltge
* bositeltge
* [ http://darrelcn.com/oulialelca.html|bositeltge ]
* [bositeltge| http://pasc4tc4tac.com/baszellaro.html ]
* bositeltge
* [bositeltge]( http://rolidarro.com/deldarro.html "bositeltge")
"bositeltge": http://varnot.com/cacoorl.html
WWW êðàòêî îáî âñ¸ì
âòîð: /RomanSavochenko
Ïðèìå÷àíèå: Ðàçðåøàåòñÿ âíîñèòü èçìåíåíèÿ â äàííûé äîêóìåíò ñ öåëüþ èñïðàâëåíèÿ îáíàðó
Contents åííûõ îøèáîê èëè ñ öåëüþ åãî äîïîëíåíèÿ.
OpenDocument: file:wwwshortall.odt
PDF: ftp://ftp.oscada.org.ua/books/WWWShortAll.pdf
<?xml version = '1.0' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF8"/> <title>Çàãîëîâîê ñàéòà</title> </head> <body bgcolor="#818181" text="#000000" link="#3366ff" vlink="#339999" alink="#33ccff"> ... Òåëî ñòðàíèöû ... </body> </html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>Çàãîëîâîê</TITLE> ... </HEAD> <BODY> ... </BODY> </HTML>
âåäåíèå
Web òåõíîëîãèè ïîëó÷àþò âñ¸ áîëüøåå ðàñïðîñòðàíåíèå, à òàê
<HTML><HEAD> <SCRIPT type="text/javascript" src="http://myscript.js"> //Ìîé ñöåíàðèé </SCRIPT> </HEAD></HTML>
å ïðèîáðåòàþò âñ¸ íîâûå è íîâûå âîçìî
function parWrite(str) { document.write("<HR><P>" + str) } parWrite(2345);
íîñòè. Ñëåäîâàòåëüíî âîïðîñ ëàêîíè÷íîãî èçëî
Ñàìûé âûñîêèé ïðèîðèòåò
åíèÿ ìàòåðèàëà, â öåëîì, ÿâëÿåòñÿ âà
function list(type) { document.write("<" + type + "L>") for( var i = 1; i < list.arguments.length; i++ ) document.write("<LI>" + list.arguments[i]+"</LI>") document.write("</" + type + "L>") } list("Î", "one", 1967, "three", "etc., etc...");
íûì äëÿ àäåêâàòíîãî âîñïðèÿòèÿ òåõíîëîãèè ïðè èçó÷åíèè. Êðîìå ýòîãî íåìàëîâà
<INPUT TYPE = "text" NAME = "age" SIZE = 3 onChange="validate(this, 18, 99)"/>
íûì ÿâëÿåòñÿ ðåøåíèå ïðîáëåìû ïîääåð
function person(name,age,sex) { this.name = name; this.age = age; this.sex = sex; } function setUser(user) { this.user = user; } function book(name, author, year, publisher, person) { this.name = name; this.author = author; this.year = year; this.publisher= publisher; this.user = person; this.setUser = setUser; //Ïîäêëþ÷åíèå ê îáúåêòó ìåòîäà setUser() } pers1 = new person("Vasja",24,"M"); book1 = new book("JavaScript","Flenagan",2006,"O`REILY",pers1); userNm=book1.user.name; book.prototype.user=null; //Óñòàíîâêà ñâîéñòâà âî âñåõ ýêçåìïëÿðàõ îáúåêòà book book1.setUser("Vasja");
àíèÿ çíàíèé â àêòóàëüíîì ñîñòîÿíèè.
Äàííûé äîêóìåíò ïðèçâàí ðåøèòü ýòè âîïðîñû ïóòåì ñ
aObjNm = new Array(<arrayLength>); aObjNm = new Array(<element0>, <element1>, ..., <elementn>); a = new Array(4); for (i=0; i < 4; i++) { a[i] = new Array(4); for(j=0; j < 4; j++) a[i][j] = "["+i+","+j+"]"; }
àòîãî è ëàêîíè÷íîãî èçëî
bfalse = new Boolean(false);
åíèÿ ìàòåðèàëà ãðàíè÷àùåãî ñî ñïðàâî÷íûì ïðåäñòàâëåíèåì.
ßçûê ãèïåðòåêñòîâîé ðàçìåòêè (HTML, XHTML è XML)
Ïðàêòè÷åñêè, ÿçûê ãèïåðòåêñòîâîé ðàçìåòêè ïîÿâèëñÿ ïåðâûì, ñîâìåñòíî ñ ïðîòîêîëîì HTTP(Hyper Text Transfer Protocol). Ñëåäîâàòåëüíî èçó÷åíèå åãî, êàê îñíîâû Web-òåõíîëîãèè ÿâëÿåòñÿ ïåðâîî÷åðåäíîé çàäà÷åé.
ßçûê ðàçìåòêè HTML ÿâëÿåòñÿ äîâîëüíî ìÿãêèì â ïëàíå òðåáîâàíèé ê ñèíòàêñèñó, ÷òî è ïðèâåëî ê çíà÷èòåëüíûì ïðîáëåìàì â ñòàíäàðòèçàöèè åãî îáðàáîòêè â ðàçëè÷íûõ WWW-áðàóçåðàõ. Äëÿ ðåøåíèÿ ýòîé ïðîáëåìû áûëî ïðèíÿòî ðåøåíèå íà ïîñòåïåííûé ïåðåõîä îò HTML ê áîëåå ñòðîãîìó ÿçûêó XML. Ïðîìå
today = new Date(); //Òåêóùåå âðåìÿ tmFromStr = new Date("November 3, 2007 13:54:00"); //Èç ñòðîêè tmSet = new Date(2007,11,3,13,54,00); //Ïðÿìàÿ óñòàíîâêà
óòî÷íîé ñòóïåíüþ â ýòîì ïåðåõîäå ñòàë ÿçûê XHTML.
Îñíîâíûì ýëåìåíòîì ýòèõ ÿçûêîâ ÿâëÿåòñÿ êîíòåéíåð, âèä êîòîðîãî, óñëîâíî, ìî
var setBGColor = new Function("document.bgColor='antiquewhite'"); document.form1.colorButton.onclick=setBGColor; <INPUT NAME="colorButton" TYPE="button" VALUE="Change background color" onClick="setBGColor()"/>
íî èçîáðàçèòü ñëåäóþùèì îáðàçîì:
<ÈìÿÒåãà òðèáóò1="Çíà÷åíèå àòðèáóòà1" òðèáóò2="Çíà÷åíèå àòðèáóòà2"> Òåëî êîíòåéíåðà </ÈìÿÒåãà>
ÿçûêàõ XHTML è XML íàëè÷èå çàêðûâàþùåãî òåãà ÿâëÿåòñÿ îáÿçàòåëüíûì òðåáîâàíèåì. ñëó÷àå îòñóòñòâèÿ òåëà êîíòåéíåðà âèä êîíòåéíåðà ïðèéìåò âèä:
<ÈìÿÒåãà òðèáóò1="Çíà÷åíèå àòðèáóòà1" òðèáóò2="Çíà÷åíèå àòðèáóòà2" />
Òàêå, ÿçûêàìè XHTML è XML çàïðåùàåòñÿ ïåðåñå÷åíèå òåãîâ. Ò.å. ðàíåå îòêðûòûå òåãè äîëíû çàêðûâàòüñÿ ïîñëå òåãîâ îòêðûòûõ â íèõ.
Îáùàÿ ñòðóêòóðà ñòðàíèöû íà ÿçûêå ãèïåðòåêñòîâîé ðàçìåòêè:
ñëó÷àå ñ HTML ýòà ñòðóêòóðà ìîåò áûòü óïðîùåíà äî âèäà:
Êàê ìîíî âèäåòü èç ïðèìåðîâ, ñòðàíèöà ñîñòîèò èç äâóõ îñíîâíûõ ÷àñòåé:
Çàãîëîâêà ñòðàíèöû (HEAD)
Òåëà ñòðàíèöû (BODY)
Êàäàÿ ÷àñòü èìååò ñâîé íàáîð òåãîâ êîòîðûé ìîåò íåçíà÷èòåëüíî ïåðåñåêàòüñÿ. Ò.å. ñóùåñòâóþò òåãè êîòîðûå ìîãóò èñïîëüçîâàòüñÿ êàê â îäíîé ÷àñòè òàê è â äðóãîé.
Îñíîâíûå òåãè ÿçûêà è èõ àòðèáóòû:
<HTML> ... </HTML> -- Çàêëþ÷àåò òåëî äîêóìåíòà.
<HEAD> ... </HEAD> -- Çàêëþ÷àåò çàãîëîâêà äîêóìåíòà.
<BODY> ... </BODY> -- Çàêëþ÷àåò òåëî ñòðàíèöû.
BackGround -- öâåò ôîíà èëè ðèñóíîê ôîíà (BACKGROUND="image.gif");
BGcolor -- öâåò ôîíà ñòðàíèöû;
Text -- öâåò òåêñòà;
Link -- öâåò ãèïåðòåêñòîâûõ ññûëîê;
ALink -- öâåò àêòèâíûõ ãèïåðòåêñòîâûõ ññûëîê;
VLink -- öâåò ïðîéäåííûõ ãèïåðòåêñòîâûõ ññûëîê;
LeftMargin -- çàäà¸ò øèðèíó ëåâîãî ïîëÿ ñòðàíèöû (â ïèêñåëàõ);
TopMargin -- çàäà¸ò øèðèíó âåðõíåãî ïîëÿ ñòðàíèöû (â ïèêñåëàõ).
<BASE Href="http://my.resource.org/test/"> - Îïðåäåëÿåò áàçîâóþ òî÷êó âõîäà. Èñïîëüçóåòñÿ îòíîñèòåëüíî àäðåñóåìûìè ññûëêàìè. Ìîåò èñïîëüçîâàòüñÿ â òåãàõ: HTML, HEAD, BODY à òàêå âíå òåëà äîêóìåíòà.
Href -- ññûëêà íà áàçîâóþ ñòðàíèöó;
Target -- áàçîâîå èìÿ ôðåéìà, äëÿ îòîáðàåíèÿ â í¸ì âíóòðåííèõ ññûëîê.
<FRAMESET> ... </FRAMESET> -- Îïèñàíèå ôðåéìîâîé ñòðóêòóðû äîêóìåíòà. Îïðåäåëÿåòñÿ òîëüêî íà îäíîé ñòðàíèöå ÿâëÿþùåéñÿ òî÷êîé âõîäà íà äîêóìåíò. Ñòðàíèöà ñ ôðåéìîâîé ñòðóêòóðîé ìîåò íå ñîäåðàòü òåëà ñòðàíèöû (<BODY>).
<NOFRAMES> Òåêñò </NOFRAMES> -- Òåêñò ñîîáùåíèÿ äëÿ áðàóçåðîâ íå ïîääåðèâàþùèõ ôðåéìû.
<!-- Êîììåíòàðèé --> -- Êîììåíòèðîâàíèå ó÷àñòêîâ òåêñòà.
Òåãè çàãîëîâêà <HEAD>
<TITLE> Hello </TITLE> -- Óñòàíàâëèâàåò èìÿ îêíà áðàóçåðà.
<META Name="Refresh" HTTP-EQUIV="Refresh" Content="1; URL=refresh.htm" /> - Ïðåäîñòàâëÿåò óïðàâëÿþùóþ èíôîðìàöèþ.
Name -- èìÿ ìåòàèíôîðìàöèè (îáû÷íî ñîâïàäàåò c HTTP-EQUIV);
Content -- ïàðàìåòð îïöèè, òèï êîòîðîé óêàçàí â HTTP-EQUIV;
HTTP-EQUIV -- òèï îïöèè:
"Refresh" -- ïåðåãðóçêà ñòðàíèöû óêàçàííîé â "Content" ÷åðåç óêàçàííîå êîëè÷åñòâî ñåêóíä (Content="1; URL=refresh.htm");
"Content-Type" -- óêàçûâàåò êîäèðîâêó äîêóìåíòà (Content="text/html; Charset=UTF8");
"Cache-Control" -- óïðàâëåíèå êåøèðîâàíèåì:
Content="no-cache" -- çàïðåòèòü êåøèðîâàíèå äîêóìåíòà;
Content="no-store" -- çàïðåòèòü õðàíåíèå äîêóìåíòà ïîñëå ïåðåñûëêè.
"Description" -- îïèñàíèå äîêóìåíòà (äëÿ ïîèñêîâûõ ñèñòåì) (Content="My home page");
"Keywords" -- êëþ÷åâûå ñëîâà äîêóìåíòà äëÿ ïîèñêîâûõ ñèñòåì (Content="home page; Vasa Pupkin").
<LINK Rel="stylesheet" Href="../css/css.htm" Type="text/css" /> -- Îáñëóèâàíèå ðàçëè÷íûõ ñâÿçåé. Îáû÷íî èñïîëüçóåòñÿ äëÿ çàãðóçêè ñòèëåé (CSS).
Rel -- òèï îòíîøåíèÿ:
"stylesheet" -- çàãðóçêà òàáëèöû ñòèëåé;
"shortcut icon" -- óêàçàíèå èêîíêè ñàéòà, âûñâå÷èâàåòñÿ â çàêëàäêàõ áðàóçåðà äëÿ äàííîãî ñàéòà.
Href -- URL;
Type -- òèï ñîäåðàíèÿ (text/css, text/javascript).
<STYLE Type="ÒèïÎïèñàíèÿÑòèëåé"> îïèñàíèå ñòèëÿ/ñòèëåé </STYLE> -- Ñîäåðèò îïèñàíèå ñòèëÿ âñåãî äîêóìåíòà.
Type -- òèï ñòèëåé (text/css, text/javascript).
<SCRIPT Type="ÒèïßçûêàÏðîãðàììèðîâàíèÿ" Src="URL"> JavaScript/VBScript-êîä </SCRIPT> -- Ðàçìåùàåò íà ñòðàíèöó êîä ñêðèïòà èç ôàéëà. Êîä ìîåò ïîìåùàòüñÿ íåïîñðåäñòâåííî â òåëå êîíòåéíåðà.
Type -- òèïà ÿçûêà (JavaScript, VBScript, JScript);
Src -- ôàéë ñî ñêðèïòàìè, óêàçûâàåòñÿ â ñëó÷àå çàãðóçêè ñêðèïòîâ èç âíåøíåãî ôàéëà.
Òåãè òåëà ñîîáùåíèÿ <BODY> Óïðàâëåíèÿ ðàçìåòêîé
<H1> Çàãîëîâîê </H1> -- Îïðåäåëåíèå çàãîëîâêà ñ óêàçàííûì óðîâíåì îò 1 äî 6.
<P/> -- Íà÷àëî íîâîãî àáçàöà.
Align -- îïðåäåëÿåò ñïîñîá âûðàâíèâàíèÿ (justify-ïî øèðèíå, left, right, center).
<ÑÅNÒÅR> Objects </CENTER> -- Öåíòðèðîâàíèå îáúåêòîâ âíóòðè òåãà.
<BR/> -- Ðàçðûâ ñòðîêè (íà÷àòü ñ íîâîé ñòðîêè).
Clear -- îñòàíîâèòü îáòåêàíèå îáúåêòà â óêàçàííîé òî÷êå (left, right, all).
<NOBR> Text </NOBR> - Ôîðìèðîâàíèå íåðàçðûâíîé ñòðîêè.
Óïðàâëåíèÿ îòîáðàåíèåì
<IG> Òåêñò </BIG> -- Òåêñò ñî øðèôò áîëåå ñòàíäàðòíîãî.
<SMALL> Òåêñò </SMALL> -- Òåêñò ñî øðèôò ìåíåå ñòàíäàðòíîãî.
<SUÐ> Èíäåêñ </SUP> -- Òåêñò â íèíåì èíäåêñå.
<SU> Èíäåêñ </SUB> -- Òåêñò â âåðõíåì èíäåêñå.
<FONT> Èåêñò </FONT> -- Òåêñò ñ óêàçàííûìè ïàðàìåòðàìè øðèôòà.
Size -- ðàçìåð øðèôòà (-1,+1,3 ...);
Color -- öâåò øðèôòà.
<I> Òåêñò </I> -- Òåêñò êóðñèâîì.
<B> Òåêñò </B> -- Óñèëåíèå òåêñòà.
<TT> Òåêñò </TT> -- Òåêñò òåëåòàéïîì.
<U> Òåêñò </U> -- Ïîä÷¸ðêèâàíèå òåêñòà.
<S> Òåêñò </S> -- Ïåðå÷¸ðêèâàíèå òåêñòà.
<ÅÌ> Òåêñò </ÅÌ> -- Òèïîãðàôñêè óñèëåííûé òåêñò.
<ÑIÒÅ> Òåêñò </ÑIÒÅ> -- Öèòàòà.
<STRONG> Òåêñò </STRONG> -- Óñèëåííûé òåêñò.
<ÑODE> Òåêñò </ÑÎDE> -- Èñõîäíûå òåêñòû êîäà (íàïðèìåð, "êîäû ïðîãðàììû").
<SÌÐ> Òåêñò </SÌÐ> -- Ëèòåðàëû.
<ÊD> Òåêñò </ÊD> -- Êëàâèàòóðíûå ñèìâîëû.
<VAR> Òåêñò </VAR> -- Ïåðåìåííàÿ.
<DFN> Òåêñò </DFN> -- Îïðåäåëåíèå.
<Q> Òåêñò </Q> -- Òåêñò â ñêîáêàõ.
<ÐRÅ> Òåêñò </PRE> -- Ïðåôîðìàòèðîâàííûé âûâîä òåêñòà (êàê åñòü).
<LÎÑKQUOTE> Òåêñò </LÎÑKQUOTE> -- Ôîðìèðîâàíèå áëîêîâ öèòàò. Äîáàâëÿþòñÿ ïîëÿ ñëåâà è ñïðàâà îò òåêñòà.
<HR/> -- Ãîðèçîíòàëüíàÿ ëèíåéêà.
<FIELDSET> Òåêñò </FIELDSET> -- Áîðäþð âîêðóã òåêñòà èëè ïðîèçâîëüíîãî ó÷àñòêà ñòðàíèöû.
<LEGEND>Çàãîëîâîê</LEGEND> -- Çàãîëîâîê îáëàñòè.
Ñïèñêè
<DL>...</DL> -- Ôîðìèðóåò ñïèñîê îïðåäåëåíèé.
<DT> Òåðìèí </DT> -- Òåðìèí îïðåäåëåíèÿ.
<DD> Îïðåäåëåíèå </DD> -- Îïðåäåëåíèå.
<UL>...</UL> -- Íåíóìåðîâàííûé ñïèñîê.
Type -- óñòàíàâëèâàåò òèï ìàðêåðà (Disk, Circle, Square).
<LI> Ýëåìåíò </LI> -- Îïèñàíèå ýëåìåíòà ïåðå÷èñëåíèÿ.
Type -- óñòàíàâëèâàåò òèï ìàðêåðà äëÿ ïîñëåäóþùèõ ýëåìåíòîâ (Disk, Circle, Square).
<OL>...</OL> -- Íóìåðîâàííûé ñïèñîê.
Type -- óñòàíàâëèâàåò òèï ìàðêåðà (l,A,a,I).
<LI> Ýëåìåíò </LI> -- Îïèñàíèå ýëåìåíòà ïåðå÷èñëåíèÿ.
Type -- óñòàíàâëèâàåò òèï ìàðêåðà äëÿ ïîñëåäóþùèõ ýëåìåíòîâ (l,A,a,I).
Òàáëèöû
<TABLE> ... </TABLE> -- Îïèñàíèå òàáëèöû.
Align -- îáùåå âûðàâíèâàíèå òàáëèöû;
Border -- òèï è ðàçìåð ãðàíèöû òàáëèöû;
Width -- îáùàÿ øèðèíà òàáëèöû (â ïèêñåëàõ èëè ïðîöåíòàõ - 50%, 300);
Height -- îáùàÿ âûñîòà òàáëèöû;
ÑellPadding -- øèðèíà ïóñòîãî ïðîñòðàíñòâà ìåäó ñîäåðèìûì ÿ÷åéêè è åå ãðàíèöàìè;
CellSpacing -- øèðèíà ïðîìåóòêîâ ìåäó ÿ÷åéêàìè;
BgColor -- öâåò ôîíà òàáëèöû;
BackGround -- ôîíîâîå èçîáðàåíèå äëÿ òàáëèöû.
<CAPTION>Ïîäïèñü</CAPTION> -- Óêàçàíèå ïîäïèñè òàáëèöû.
Align -- âûðàâíèâàíèå ïîäïèñè (top, bottom).
<TR> ... </TR> -- Ôîðìèðîâàíèå ñòðîêè.
Width -- øèðèíà ñòðîêè;
BgColor -- öâåò ôîíà ñòðîêè;
Align -- âûðàâíèâàíèå ïî ãîðèçîíòàëè (blåådleft, left, ñånter, right);
Valign -- âûðàâíèâàíèå ïî âåðòèêàëå (top, middle, bottom).
<TD Colspan="3">Òåêñò</TD> -- Îïèñàíèå ÿ÷åéêè ñòðîêè.
Align -- âûðàâíèâàíèå ïî ãîðèçîíòàëè (blåådleft, left, ñånter, right);
Valign -- âûðàâíèâàíèå ïî âåðòèêàëå (top, middle, bottom);
ColSpan -- îáúåäèíåíèå óêàçàííîãî êîëè÷åñòâà êîëîíîê â îäíó;
RowSpan -- îáúåäèíåíèå óêàçàííîãî êîëè÷åñòâà ñòðîê â îäíó;
Nowrap -- íå ïåðåíîñèòü ñîäåðèìîå ÿ÷åéêè íà ñëåäóþùóþ ñòðîêó;
BgColor -- öâåò ôîíà ÿ÷åéêè;
BackGround -- ôîíîâîå èçîáðàåíèå ÿ÷åéêè;
Width -- øèðèíà ÿ÷åéêè.
<TH> Òåêñò </TH> -- Çàãîëîâîê.
Align -- âûðàâíèâàíèå ïî ãîðèçîíòàëè (blåådleft, left, ñånter, right);
Valign -- âûðàâíèâàíèå ïî âåðòèêàëå (top, middle, bottom);
Colspan -- îáúåäèíåíèå óêàçàííîãî êîëè÷åñòâà êîëîíîê â îäíó;
RowSpan -- îáúåäèíåíèå óêàçàííîãî êîëè÷åñòâà ñòðîê â îäíó;
Nowrap -- íå ïåðåíîñèòü ñîäåðèìîå ÿ÷åéêè íà ñëåäóþùóþ ñòðîêó;
BgColor -- öâåò ôîíà ÿ÷åéêè;
BackGround -- ôîíîâîå èçîáðàåíèå ÿ÷åéêè;
Width -- øèðèíà ÿ÷åéêè.
Ãèïåðòåêñòîâûå ññûëêè
<A Href="http://myaddr.org"> Ìîÿ ññûëêà </A> - ßêîðü. Ôîðìèðîâàíèå òåêñòîâîé ññûëêè.
Href -- ñîäåðèò àäðåñ ãèïåðññûëêè.
<A Href=" ãèïåðòåêñòîâàÿ ññûëêà</A>
<A Href=" íà òî÷êó "ðîint" â äîêóìåíòå</A>
<A Href="http://myaddr.org"><IMG Href="http://youraddr.org/img.png"/></A> -- Ðèñóíîê â êà÷åñòâå ññûëêè.
<A Href="mailto:myaddr@mail.org">Ññûëêà íà àäðåñ ýëåêòðîííîé ïî÷òû</A>.
Target -- èìÿ ôðåéìà íà êîòîðûé ïîìåùàòü äàííóþ ññûëêó (Target="main");
Name -- îáúÿâëåíèå òî÷êè äëÿ ññûëêè âíóòðè äîêóìåíòà (Name="ðîint").
Èçîáðàåíèÿ
<IMG Src="http://mysite.org/img.png" Alt="Ðèñóíîê"/> -- Ôîðìèðîâàíèå ðèñóíêà.
Src -- àäðåñ ôàéëà èçîáðàåíèÿ;
Alt -- òåêñò âûâîäèìûé áðàóçåðîì âìåñòî èçîáðàåíèÿ (èçîáðàåíèÿ âûêëþ÷åíû);
Align -- ñïîñîá îáòåêàíèÿ èçîáðàåíèÿ (top, texttop, middle, absmiddle, baseline, bottom, absbottom, left, right, all);
ÍSpace -- øèðèíà ãîðèçîíòàëüíûõ ïîëåé îòäåëÿþùèõ ðèñóíîê;
VSpace -- øèðèíà âåðòèêàëüíûõ ïîëåé îòäåëÿþùèõ ðèñóíîê;
Border -- øèðèíà ðàìêè âîêðóã èçîáðàåíèÿ.
Width -- øèðèíà èçîáðàåíèÿ;
Height -- âûñîòà èçîáðàåíèÿ;
Usemap -- èìÿ êàðòû äàííîãî èçîáðàåíèÿ <IMG Src="mage.png" Alt="Èçîáðàåíèÿ" Usemap="#map">, êàðòà îïèñûâàåò àêòèâíûå ó÷àñòêè èçîáðàåíèÿ.
<MAP Name="map"> ... </MAP> -- Îïèñàíèå êàðòû èçîáðàåíèÿ.
Name -- èìÿ êàðòû;
<AREA Shape="rect" Coords="0,0,100,100" Href="http://mydomain.org"/> -- Îïèñàíèå àêòèâíîé îáëàñòè è ññûëêè.
Shape -- âèä àêòèâíîé îáëàñòè (rect, circle, poly, default);
Coords -- êîîðäèíàòû àêòèâíîé îáëàñòè;
Href -- àäðåñ ãèïåðñûëêè;
Nohref -- áåç ññûëêè.
Ôîðìû
<FORM Method="post" Action="http://mydomen.org"> ... </FORM> -- Ôîðìèðîâàíèå ôîðìû.
Method -- ìåòîä óâåäîìëåíèÿ WWW-ñåðâåðà (Get, Post);
Action -- àäðåñ ñåðâåðà îáðàáàòûâàþùåãî äàííûå ôîðìû.
<INPUT Name="Name" Size="35"/> -- Ïîëå ââîäà ñòðîêè.
Name -- íàèìåíîâàíèå ïîëÿ ââîäà;
Type -- òèï ïîëÿ ââîäà:
"text" -- ââîä òåêñòà;
"checkbox" -- ôëàîê âûáîðà (Checked -- âûáðàí);
"radio" -- ôëàîê âûáîðà îäíîãî èç ãðóïïû ôëàêîâ;
"password" -- ïîëå ââîäà ïàðîëÿ (áåç îòîáðàåíèÿ ââåäåííûõ ñèìâîëîâ);
"reset" -- êíîïêà ñáðîñà ôîðìû (Value -- íàäïèñü íà êíîïêå);
"submit" -- êíîïêà çàâåðøåíèÿ ââîäà äàííûõ (Value -- íàäïèñü íà êíîïêå);
"hidden" -- ñêðûòîå ïîëå (äëÿ ñêðûòèÿ àòðèáóòîâ Name è Value è èñïîëüçîâàíèå èõ â óïðàâëÿþùèõ öåëÿõ);
"file" -- ïîëå ââîäà/âûáîðà ôàéëà;
"button" -- êíîïêà;
"image" -- âûïîëíÿåò ôóíêöèþ çàâåðøåíèÿ ââîäà ïî êëèêó íà èçîáðàåíèè (Src -- ñîäåðèò àäðåñ èçîáðàåíèÿ).
MaxLength -- ìàêñèìàëüíîå ÷èñëî ñèìâîëîâ ââîäèìîå â ïîëå (ïî óìîë÷àíèþ ÷èñëî ñèìâîëîâ íå îãðàíè÷åíî);
Size -- ðàçìåð ïîëÿ ââîäà (ñèìâîëîâ);
Value -- íà÷àëüíîå çíà÷åíèå ïîëÿ ââîäà èëè èìÿ äëÿ checkbox è radio, à òàêå íàäïèñü íà êíîïêàõ;
Src -- ñîäåðèò ïóòü ê ôàéëó èçîáðàåíèÿ äëÿ êíîïîê;
Align -- âûðàâíèâàíèå äëÿ (Type="image");
Checked -- ôëàîê âûáðàí (äëÿ Type="checkbox");
Disabled -- ïîëå ââîäà íåàêòèâíî/îòêëþ÷åíî.
<TEXTAREA Name="name" Cols="38" Rows="3">Òåêñò</TEXTAREA> -- Îáëàñòü ââîäà áîëüøîãî êîëè÷åñòâà òåêñòà.
Name -- íàèìåíîâàíèå îáëàñòè ââîäà;
Cols -- êîëè÷åñòâî êîëîíîê ââîäà;
Rows -- êîëè÷åñòâî âèäèìûõ ñòðîê òåêñòîâîãî ââîäà.
<SELECT Name="mysel"> ... </SELECT> -- Ïîëå âûáîðà çíà÷åíèé (combobox).
Multiple -- âûáèðàòü áîëåå îäíîãî íàèìåíîâàíèÿ;
Name -- íàèìåíîâàíèå îáúåêòà;
Size -- êîëè÷åñòâî âèäèìûõ ñòðîê ñïèñêà (1 - êàê combobox).
<OPTION> àðèàíò 1 </OPTION> -- Îïèñàíèå ýëåìåíòà ñïèñêà.
Selected -- ýëåìåíò âûáðàí;
Value -- çíà÷åíèå âîçâðàùàåìîå ôîðìîé ïðè âûáîðå.
Ôðåéìû
<FRAMESET Cols="30%,*"> ... </FRAMESET> -- Ôîðìèðîâàíèå ôðåéìîâîé ñòðóêòóðû.
Cols -- ïåðå÷åíü (÷åðåç ",") êîëîíîê è èõ ðàçìåðû (* - îñòàâøååñÿ ïðîñòðàíñòâî);
Rows -- ïåðå÷åíü (÷åðåç ",") ñòðîê è èõ ðàçìåðû (* - îñòàâøååñÿ ïðîñòðàíñòâî).
<FRAMESET Cols="30%,*"> ... </FRAMESET> -- Ðåêóðñèâíîå âëîåíèå ôðåéìîâûõ ñòðóêòóð.
<FRAME Src="index.html" Name="Left" /> -- Îïèñàíèå îòäåëüíî âçÿòîãî ôðåéìà.
Name -- èìÿ ôðåéìà (ïî ýòîìó èìåíè âûïîëíÿþòñÿ ññûëêè íà ôðåéì);
Src -- óêàçûâàåò íà URL ôðåéìà;
ÌarginWidth -- ãîðèçîíòàëüíûé îòñòóï ìåäó ñîäåðèìûì êàäðà è åãî ãðàíèöàìè;
ÌarginHeight -- âåðòèêàëüíûé îòñòóï ìåäó ñîäåðèìûì êàäðà è åãî ãðàíèöàìè;
Scrolling -- íàëè÷èå ïîëîñû ïðîêðóòêè âî ôðåéìå (no,yes,auto);
NoResize -- çàïðåòèòü èçìåíåíèå ðàçìåðà ôðåéìà.
<NOFRAMES> Òåêñò </NOFRAMES> -- Ñîäåðèò èíôîðìàöèþ äëÿ áðàóçåðîâ íå ïîääåðèâàþùèõ ôðåéìû.
Êàñêàäíûå òàáëèöû ñòèëåé (CSS)
Ïðåäíàçíà÷åíû äëÿ ðàñøèðåíèÿ óïðàâëÿåìîñòè òåêñòîâîé ÷àñòè äîêóìåíòà, à òàêå äëÿ âûäåëåíèÿ ñòèëåâîé ñîñòàâëÿþùåé äîêóìåíòà â îòäåëüíóþ ÷àñòü, îñòàâèâ ÿçûêàì HTML/XHTML/XML äåêëàðàòèâíûå ôóíêöèè â ôîðìèðîâàíèè äîêóìåíòà.
Ïîääåðèâàåòñÿ íåñêîëüêî ñïîñîáîâ âêëþ÷åíèÿ ñòèëåé â äîêóìåíò. ñå îíè ïåðå÷èñëåíû íèå â ñîîòâåòñòâèå ñ èåðàðõè÷íîñòüþ:
Çàãðóçêà èç ôàéëà ïîñðåäñòâîì òåãà <LINK> â çàãîëîâêå <HEAD> : <LINK Rel="stylesheet" Href="../css/css.htm" Type="text/css" /> ;
Îïèñàíèå â òåãå <STYLE> çàãîëîâêà äîêóìåíòà <HEAD> : <STYLE>P { color:grey; text-align:left }</STYLE> ;
Îïèñàíèå ñòèëÿ íåïîñðåäñòâåííî â òåãå íàçíà÷åíèÿ èñïîëüçóÿ àòðèáóò Style : <P Style="color:grey; text-align:left"></P> .
Ñèíòàêñèñ îïèñàíèÿ ñòèëåé ìîåò áûòü äâóõ òèïîâ:
selector[, selector[, ...]]{ attribute:value;[atribute:value;...] } -- ïåðå÷èñëåíèå ñåëåêòîðîâ, äëÿ êîòîðûõ äåéñòâóåò äàííîå îïèñàíèå ñòèëÿ.
selector selector [selector ...] { attribute:value;[atribute:value;...] } -- çàäàíèå èåðàðõèè âëîåííîñòè ñåëåêòîðîâ, äëÿ ñîâîêóïíîñòè êîòîðûõ îïðåäåëåí ñòèëü.
Ïðè ýòîì ñåëåêòîð <selector> ìîåò áûòü ïðåäñòàâëåí ñëåäóþùèìè ñïîñîáàìè:
Èìåíåì òåãà: P { color:grey; text-align:left } .
Êëàññîì ñòèëÿ: .myclass { color:grey; text-align:left } . Èñïîëüçîâàíèå êëàññà äîëíî óêàçûâàòüñÿ â òåãàõ ñ ïîìîùüþ àòðèáóòà Class : <P Class="myclass"></P> .
Èìåíåì òåãà è êëàññîì ñòèëÿ: P.myclass { color:grey; text-align:left } . Èñïîëüçîâàíèå òàêå äîëíî óêàçûâàòüñÿ â òåãàõ ñ ïîìîùüþ àòðèáóòà Class : <P Class="myclass"></P> .
Ïî èäåíòèôèêàòîðó òåãà: #myid { color:grey; text-align:left } . Ñîîòâåòñòâåííî, ó òåãà äîëåí áûòü îïðåäåë¸í àòðèáóò Id : <P Id="myid"></P> .
Ïî ìîäèôèêàòîðó òåãà: P:first-line { color:green } .
Ñïåöèôèêàöèÿ ÿçûêîâ HTML/XHTML/XML ñîäåðèò îïðåäåëåíèå îáîáùàþùèõ ýëåìåíòîâ. Ýòèìè ýëåìåíòàìè ÿâëÿþòñÿ áëî÷íûé DIV è ñòðîêîâûé SPAN. ñå äðóãèå ýëåìåíòû òåêñòîâîé ðàçìåòêè ìîíî îïèñàòü ÷åðåç DIV è SPAN èñïîëüçóÿ CSS. Ñîáñòâåííî, òîëüêî â ñâÿçêå ñ CSS ýëåìåíòû DIV è SPAN èìåþò ñìûñë.
áëî÷íîì ýëåìåíòå DIV ìîíî ìàíèïóëèðîâàòü ãðàíèöàìè áëîêà (border ), îòñòóïàìè ê íåé îò âíåøíåãî áëîêà (margin ) è îò âíóòðåííåãî (padding ).
òðèáóòû Ãðàíèöû áëîêà
border -- êðàòêîå îïèñàíèå ïàðàìåòðîâ âñåé ãðàíèöû ("1px solid blue");
border-top -- êðàòêîå îïèñàíèå ïàðàìåòðîâ ãðàíèöû ñâåðõó;
border-bottom -- êðàòêîå îïèñàíèå ïàðàìåòðîâ ãðàíèöû ñíèçó;
border-left -- êðàòêîå îïèñàíèå ïàðàìåòðîâ ãðàíèöû ñëåâà;
border-right -- êðàòêîå îïèñàíèå ïàðàìåòðîâ ãðàíèöû ñïðàâà;
border-width -- îáùàÿ øèðèíà ãðàíèöû;
border-top-width -- øèðèíà ãðàíèöû ñâåðõó;
border-bottom-width -- øèðèíà ãðàíèöû ñíèçó;
border-left-width -- øèðèíà ãðàíèöû ñëåâà;
border-right-width -- øèðèíà ãðàíèöû ñïðàâà;
border-color -- îáùèé öâåò ãðàíèöû;
border-top-color -- öâåò âåðõíåé ãðàíèöû;
border-bottom-color -- öâåò íèíåé ãðàíèöû;
border-left-color -- öâåò ëåâîé ãðàíèöû;
border-right-color -- öâåò ïðàâîé ãðàíèöû;
border-style -- îáùèé ñòèëü ãðàíèöû (none, dotted, dashed, solid, double, groove, ridge, inset, outset);
border-top-style -- ñòèëü âåðõíåé ãðàíèöû;
border-bottom-style -- ñòèëü íèíåé ãðàíèöû;
border-left-style -- ñòèëü ëåâîé ãðàíèöû;
border-right-style -- ñòèëü ïðàâîé ãðàíèöû.
Îòñòóïû áëîêà. Îòñòóïû îò âíåøíåãî áëîêà (margin) è îò âíóòðåííåãî, íàáèâêà (padding)
margin -- îáùèé âíåøíèé îòñòóï ("5px" èëè ïåðå÷èñëåíèå: "5px 3px 5px 3px");
margin-top -- âåðõíèé âíåøíèé îòñòóï;
margin-bottom -- íèíèé âíåøíèé îòñòóï;
margin-left -- ëåâûé âíåøíèé îòñòóï;
margin-right -- ïðàâûé âíåøíèé îòñòóï;
padding -- îáùèé ðàçìåð íàáèâêè ("4px" èëè ïåðå÷èñëåíèå: "4px 3px 2px 1px");
padding-left -- ðàçìåð íàáèâêè ñëåâà;
padding-right -- ðàçìåð íàáèâêè ñïðàâà;
padding-top -- ðàçìåð íàáèâêè ñâåðõó;
padding-bottom -- ðàçìåð íàáèâêè ñíèçó.
Îáòåêàíèå è âûðàâíèâàíèå áëîêà
float -- ôîðìèðîâàíèå ïëàâàþùåãî áëîêà è åãî ðàñïîëîåíèå (left, right, both);
clear -- îáòåêàíèå áëîêà (right, left, none, both).
Öâåò è øðèôò â CSS
color -- öâåò òåêñòà;
background -- êðàòêîå îïèñàíèå õàðàêòåðèñòèê ôîíà (background: blue http://mysyte.org/bk.png no-repeat fixed center);
background-color -- öâåò ôîíà;
background-image -- àäðåñ ôîíîâîãî èçîáðàåíèÿ;
background-repeat -- ?
background-attachment -- ?
background-position -- ?
font -- êðàòêîå îïèñàíèå øðèôòà (font:bold 10pt verbana);
font-family -- ñåìåéñòâî øðèôòà (verbana, arial, sans-serif);
font-style -- ñòèëü øðèôòà (italic, normal );
font-weight -- óñèëåíèå øðèôòà (normal, bold);
font-size -- ðàçìåð øðèôòà, êåãëü (10pt, large, larger, small, smaller, medium, x-small, xx-small);
font-variant -- âàðèàíò íà÷åðòàíèÿ êîïèòåëü (normal, small-caps).
Óïðàâëåíèå òåêñòîì
letter-spacing -- ðàññòîÿíèå ìåäó áóêâàìè òåêñòà;
line-height -- ðàññòîÿíèå ìåäó ñòðîêàìè òåêñòà;
text-align -- âûðàâíèâàíèå òåêñòà (justify, left, right, center);
text-transform -- ïðåîáðàçîâàíèå òåêñòà (uppercase, lowercase, capitalize);
text-decoration -- îôîðìëåíèå òåêñòà (none, underline, line-through);
text-indent -- îòñòóï ïåðâîé ñòðîêè ïàðàãðàôà (àáçàö).
Óïðàâëåíèå âèäèìîñòüþ. Ñëîè. Ïîëîåíèÿ è ðàçìåðû áëîêîâ
Äðóãèå àòðèáóòû
display -- îïðåäåëÿåò âèäèìîñòü ýëåìåíòà (none);
list-style-type -- ñòèëü çíà÷êîâ ñïèñêà (none, square, disk, circle, lower-roman, upper-alpha, lower-alpha);
white-space -- ïóñòîå ïðîñòðàíñòâî (nowrap).
font-face -- ? ;
vertical-align -- âåðòèêàëüíîå âûðàâíèâàíèå (top).
Ìîäèôèêàòîðû òåãîâ
Ìîäèôèêàòîðû èñïîëüçóþòñÿ äëÿ êîíêðåòèçàöèè ãðóïïû ñâîéñòâ òåãà.
Òåêñò <span>:
:first-line -- ìîäèôèêàòîð ïåðâîé ñòðîêè ïàðàìåòðà;
:first-letter -- ìîäèôèêàòîð ïåðâîé áóêâû ïåðâîé ñòðîêè.
Ãèïåðòåêñòîâûå ññûëêè <a>:
:link -- ññûëêà ïî óìîë÷àíèþ;
:visited -- ïîñåù¸ííàÿ ññûëêà;
:hover -- ïîä êóðñîðîì;
:active -- àêòèâíàÿ.
JavaScript
JavaScript ýòî ÿçûê ñîçäàííûé ôèðìîé Netscape äëÿ ïðîãðàììèðîâàíèÿ ãèïåðòåêñòîâûõ ñòðàíèö ñ èñïîëíåíèåì ïðîãðàììû íà ñòîðîíå áðàóçåðà. Ïðîãðàììèðîâàíèå çàêëþ÷àåòñÿ âî âíåäðåíèè òåêñòîâ ïðîãðàìì íà ÿçûêå JavaScript â òåëî ãèïåðòåêñòîâûõ ñòðàíèö è ïîñëåäóþùåå èñïîëíåíèå ýòèõ ïðîãðàìì áðàóçåðîì. Èñïîëüçîâàíèå ýòîãî ÿçûêà â ñîçäàíèè ñàéòîâ ïîçâîëÿåò ñäåëàòü èõ áîëåå èâûìè è äèíàìè÷íûìè. Ïîñðåäñòâîì ÿçûêà JavaScript ìîíî ïîëó÷èòü äîñòóï íå òîëüêî ê äîêóìåíòó íà êîòîðîì ïðîãðàììà ðàçìåùåíà, íî è ê ñâîéñòâàì ñàìîãî áðàóçåðà. ïîñëåäñòâèè ÿçûê áûë ñòàíäàðòèçèðîâàí ECMA (European Computer Manufacturers Association).
ßçûê îáâÿçûâàåò îáúåêòíóþ ìîäåëü áðàóçåðà è äîêóìåíòîâ îïåðèðóÿ ñâîéñòâàìè, ìåòîäàìè è ñîáûòèÿì îáúåêòîâ. Ñâîéñòâàìè îáúåêòà ÿâëÿþòñÿ àòðèáóòû òåãîâ ñòðàíèöû, à òàêå àòðèáóòû îáúåêòîâ áðàóçåðà. Ìåòîäàìè îáúåêòîâ âûñòóïàþò ôóíêöèè èçìåíåíèÿ ñâîéñòâ îáúåêòîâ äîêóìåíòà è áðàóçåðà. Ñîáûòèÿ îáúåêòîâ ïðåäñòàâëåíû ôóíêöèÿìè, êîòîðûå àêòèâèðóþòñÿ ïðè âûïîëíåíèè òîãî èëè èíîãî äåéñòâèÿ íàä îáúåêòîì. ñå òåãè ãèïåðòåêñòîâîé ñòðàíèöû ðàñøèðåíû àòðèáóòàìè ïðåäñòàâëÿþùèìè ñîáûòèéíûå ôóíêöèè. Äëÿ îáðàáîòêè ñîáûòèé êîä ïðîãðàììû ïîìåùàåòñÿ â çíà÷åíèå ýòèõ àòðèáóòîâ.
öåëîì, êîä ñöåíàðèåâ ìîåò ðàçìåùàòüñÿ íà ñòðàíèöå ñëåäóþùèìè ñïîñîáàìè:
ãèïåðòåêñòîâîé ññûëêè (URL-ñõåìà). ûïîëíÿåòñÿ îáðàáîòêà ïðîãðàììû âìåñòî ññûëêè. Èñïîëüçóåòñÿ â àòðèáóòàõ ñîäåðàùèõ URL. Íàïðèìåð:
<a href="javascript:alert('Message!');">Message</a>
îáðàáîò÷èêå ñîáûòèé. Èñïîëüçóåòñÿ äëÿ ðàçìåùåíèÿ ñöåíàðèåâ îáðàáîòêè ñîáûòèé. Íàïðèìåð:
<input type="button" value="Press" onClick="window.alert('Warning');"/>
Ïîäñòàíîâêà. ûïîëíÿåòñÿ ïîäñòàíîâêà â àòðèáóòû êîíòåéíåðîâ äîêóìåíòà ðåçóëüòàòà èñïîëíåíèÿ ñêðèïòà. Íàïðèìåð:
<input type="text" value="&{window.location.href}"/>
ñòàâêà ÷åðåç êîíòåéíåð SCRIPT . Ïîñðåäñòâîì êîíòåéíåðà SCRIPT ïðîèçâîäèòñÿ êàê çàãðóçêà ôàéëîâ ñî ñöåíàðèÿìè òàê è íåïîñðåäñòâåííîå îïðåäåëåíèå òåêñòà ñöåíàðèåâ. ûïîëíåíèå ñöåíàðèåâ ïðîèçâîäèòñÿ ñðàçó, ïðè îáíàðóåíèè ýòîãî êîíòåéíåðà â ïðîöåññå îáðàáîòêè äîêóìåíòà. Äàííûé ñïîñîá ìîíî èñïîëüçîâàòü äëÿ ðàçìåùåíèÿ êîäà âíóòðè äîêóìåíòà è óñëîâíîé ãåíåðàöèè äîêóìåíòà íà ñòîðîíå áðàóçåðà. Åñëè óêàçàí èñõîäíûé ôàéë â àòðèáóòå <src> è îí ïðèñóòñòâóåò, òî òåëî êîíòåéíåðà SCRIPT íå îáðàáàòûâàåòñÿ. Ïðèìåð:
Òèïû äàííûõ
ßçûêîì JavaScript ïîääåðèâàåòñÿ íåñêîëüêî ïðîñòûõ òèïîâ:
Ïåðåìåííûå â JavaScript îïðåäåëÿþòñÿ ïóò¸ì ïðÿìîãî ïðèñâàèâàíèÿ â íîâóþ ïåðåìåííóþ (x=3) èëè ïîñðåäñòâîì var (var x=3). Òèï ïåðåìåííîé ìåíÿåòñÿ ïðè ïðèñâàèâàíèè çíà÷åíèÿ äðóãîãî òèïà. Ïðè ñìåøàííûõ îïåðàöèÿõ ñóììèðîâàíèÿ ðåçóëüòàòîì ÿâëÿåòñÿ ñòðîêà.
Îïåðàöèè
Ñèìâîë Îïèñàíèå
() ûçîâ ôóíêöèè
[] ûäåëåíèå ýëåìåíòà ìàññèâà
. ûäåëåíèå ýëåìåíòà ñòðóêòóðû èëè îáúåäèíåíèÿ
++ Ïîñò-ïðèðàùåíèå
-- Ïîñò-äåêðåìåíò
+ Óíàðíûé ïëþñ
- Óíàðíûé ìèíóñ
! Ëîãè÷åñêîå îòðèöàíèå
~ Ïîáèòîâîå îòðèöàíèå
* Óìíîåíèå
/ Äåëåíèå
% Îñòàòîê îò äåëåíèÿ
+ Ñóììà
- Ðàçíîñòü
<< Ñäâèã âëåâî
>> Ñäâèã âïðàâî
>>> Ñäâèã âïðàâî, ñ çàïîëíåíèåì íóëÿìè
< Ìåíüøå
<= Ìåíüøå è ðàâíî
> Áîëüøå
>= Áîëüøå è ðàâíî
== Ðàâíî
!= Íåðàâíî
& Ïîðàçðÿäíûé "È"
^ Ïîðàçðÿäíûé "èñêëþ÷àþùèé ÈËÈ"
| Ïîðàçðÿäíûé "ÈËÈ"
&& Ëîãè÷åñêèé "È"
|| Ëîãè÷åñêèé "ÈËÈ"
?: Óñëîâíàÿ îïåðàöèÿ(var i=(val>=0)?val:-val;)
= Ïðèñâàèâàíèå
+=, -=, *=, /=, %=, |=, &=, <=, >= Ñîñòàâíîå ïðèñâàèâàíèå
Îïåðàòîðû
Óïðàâëÿþùèå îïåðàòîðû:
if...else -- Óñëîâíûå îïåðàòîðû.
Çàïèñü : if(<condition>) <statements1>; [ else <statements2>; ]
Äåéñòâèå : Åñëè óñëîâèå <condition> èñòèííî, âûïîëíÿåòñÿ âûðàåíèå <statements1>, èíà÷å <statements2>. Óñëîâèå ìîåò áûòü ëþáûì JavaScript-âûðàåíèåì, êîòîðîå ìîíî îöåíèòü êàê èñòèííîå èëè ëîíîå. ûðàåíèÿ, êîòîðûå íóíî âûïîëíèòü, ìîãóò áûòü ëþáûìè JavaScript-îïåðàòîðàìè, âêëþ÷àÿ óñëîâíûå. Áîëåå ÷åì îäèí îïåðàòîð äîëåí áûòü çàêëþ÷åí â ôèãóðíûå ñêîáêè, { }.
for, for...in, while, break è continue -- Îïåðàòîðû öèêëîâ. òåëå öèêëà ìîãóò èñïîëüçîâàòüñÿ îïåðàòîðû <break> è <continue>. Ïåðâûé äëÿ ïðåðûâàíèÿ öèêëà, à âòîðîé äëÿ ïåðåõîäà ê ñëåäóþùåé èòåðàöèè öèêëà.
Çàïèñü : for ( <initstatement>; <condition>; <poststatement> ) <statement>;
Äåéñòâèå : ûïîëíåíèå âûðàåíèÿ <statement> ïîêà óñëîâèå <condition> èñòèííî. Ïåðåä çàïóñêîì öèêëà âûïîëíÿåòñÿ âûðàåíèå <initstatement>. Ïîñëå êàäîé èòåðàöèè öèêëà âûïîëíÿåòñÿ âûðàåíèå <poststatement>.
Çàïèñü : while(<condition>) <statement>;
Äåéñòâèå : ûïîëíåíèå âûðàåíèÿ <statement> ïîêà óñëîâèå <condition> èñòèííî.
Çàïèñü : for( <attr> in <obj> ) <statement>;
Äåéñòâèå : ûïîëíåíèå âûðàåíèÿ <statement> äëÿ âñåõ àòðèáóòîâ <attr> îáúåêòà <obj>.
new, this è with -- Îïåðàòîðû ìàíèïóëÿöèè ñ îáúåêòàìè.
// <coment> è /* <coment> */ -- Êîììåíòàðèè. Ïåðâûé ýòî îäíî-ñòðî÷íûé êîììåíòàðèé, à âòîðîé ìíîãî-ñòðî÷íûé.
Ñïåöèàëüíûå îïåðàòîðû:
new {Type} -- Ñîçäàíèå ýêçåìïëÿðà îáúåêòà ïîëüçîâàòåëüñêîãî èëè âñòðîåííîãî òèïà (name = new typ( param1 [,param2] ...[,paramN] )).
typeof {Operand} -- Îïðåäåëåíèå òèïà îïåðàíäà. îçâðàùàåò òèï îïåðàíäà â âèäå ñòðîêè (typeof val).
void (expression) -- Îïðåäåëÿåò âûðàåíèå, êîòîðîå íå âîçâðàùàåò íèêàêîãî çíà÷åíèÿ ( void (0) ).
Ôóíêöèè
Ôóíêöèè - îäèí èç ôóíäàìåíòàëüíûõ áëîêîâ JavaScript. Ôóíêöèÿ - JavaScript-ïðîöåäóðà - íàáîð îïåðàòîðîâ, êîòîðûé èñïîëíÿåò îïðåäåëåííóþ çàäà÷ó. Îïðåäåëÿåòñÿ è èñïîëüçóåòñÿ ôóíêöèÿ ñëåäóþùèì îáðàçîì:
ßçûêîì ïðåäóñìîòðåíà ïîääåðêà ïåðåìåííîãî ÷èñëà ïàðàìåòðîâ ôóíêöèé. Äëÿ äîñòóïà ê ïðîèçâîëüíîìó ïàðàìåòðó ïðåäóñìîòðåí çàïðîñ: <functionName>.arguments[i] . Äëÿ îïðåäåëåíèÿ ÷èñëà äîñòóïíûõ àòðèáóòîâ èñïîëüçóåòñÿ çàïðîñ: <functionName>.arguments.length . Ïðèìåð ôóíêöèè ñ ïåðåìåííûì ÷èñëîì ïàðàìåòðîâ è å¸ âûçîâ ïðèâåä¸í íèå:
Ñîáûòèÿ è èõ îáðàáîòêà
Óïðàâëåíèå ýëåìåíòàìè äîêóìåíòà ïîëüçîâàòåëåì ïåðåäàþòñÿ â ïðîãðàììó ïîñðåäñòâîì ñîáûòèé. Ñòàíäàðòàìè óïðàâëåíèÿ áðàóçåðîì ïðåäóñìîòðåíà ãðóïïà ñîáûòèé äëÿ ðàçëè÷íûõ ýëåìåíòîâ, êîòîðûå ïåðå÷èñëåíû â òàáëèöå íèå.
Ñîáûòèå/îáðàáîò÷èê Îáëàñòü èñïîëüçîâàíèÿ Ïðè÷èíà âîçíèêíîâåíèÿ Ìåòîä èìèòàöèè
onAbort images Ïîëüçîâàòåëü ïðåðûâàåò çàãðóçêó èçîáðàåíèÿ.
onBlur windows, frames è âñå ôîðìû ýëåìåíòîâ Ïîëüçîâàòåëü óáèðàåò ôîêóñ ââîäà. blur()
onChange òåêñòîâûå ïîëÿ, òåêñòîâûå îáëàñòè Ïîëüçîâàòåëü ìåíÿåò çíà÷åíèå ýëåìåíòà. change()
onClick button, radio button, checkboxes, submit button, reset button, links Ïîëüçîâàòåëü âûáèðàåò ôîðìó èëè ññûëêó. click()
onDblClick button, radio button, checkboxes, submit button, reset button, links Äâîéíîé ùåë÷îê
onError images, windows Îøèáêà çàãðóçêè äîêóìåíòà èëè èçîáðàåíèÿ.
onFocus windows, frames, è âñå ôîðìû ýëåìåíòîâ. Ïîëüçîâàòåëü ïåðåäàåò ôîêóñ ââîäà. focus()
onKeyDown button, radio button, checkboxes, submit button, reset button, links Íààòà êëàâèøà íà êëàâèàòóðå
onKeyPress button, radio button, checkboxes, submit button, reset button, links Íààòà è îòïóùåíà êëàâèøà íà êëàâèàòóðå
onKeyUp button, radio button, checkboxes, submit button, reset button, links Îòïóùåíà êëàâèøà íà êëàâèàòóðå
onLoad òåëî äîêóìåíòà Ïîëüçîâàòåëü çàãðóàåò ñòðàíèöó â áðàóçåð.
onMouseDown button, radio button, checkboxes, submit button, reset button, links Íààòà êíîïêà ìûøè â ïðåäåëàõ òåêóùåãî ýëåìåíòà.
onMouseMove button, radio button, checkboxes, submit button, reset button, links Ïåðåìåùåíèå êóðñîðà ìûøè â ïðåäåëàõ òåêóùåãî ýëåìåíòà.
onMouseOut button, radio button, checkboxes, submit button, reset button, links Ïîëüçîâàòåëü ïåðåìåùàåò óêàçàòåëü ìûøè ïî îáëàñòè.
onMouseOver button, radio button, checkboxes, submit button, reset button, links Êóðñîð ìûøè íàâåäåí íà òåêóùèé ýëåìåíò.
onMouseUp button, radio button, checkboxes, submit button, reset button, links Îòïóùåíà êíîïêà ìûøè â ïðåäåëàõ òåêóùåãî ýëåìåíòà .
onMove window Ïåðåìåùåíèå îêíà.
onReset form Ñáðîñ äàííûõ ôîðìû ( ùåë÷îê ïî êíîïêå <input type="reset"> ). reset()
onResize window Èçìåíåíèå ðàçìåðîâ îêíà.
onSelect input, textarea ûäåëåíèå òåêñòà â òåêóùåì ýëåìåíòå.
onSubmit form Îòïðàâêà äàííûõ ôîðìû ( ùåë÷îê ïî êíîïêå <input type="submit"> ). submit()
onUnload body, frameset Ïîïûòêà çàêðûòèÿ îêíà áðàóçåðà è âûãðóçêè äîêóìåíòà
Îáúåêòû
JavaScript îáúåêòû ïðåäñòàâëåíû îáúåêòíîé ìîäåëüþ áðàóçåðà è âñòðîåííûìè íå âèçóàëüíûìè îáúåêòàìè. Êðîìå òîãî, ïîëüçîâàòåëåì ìîãóò ñîçäàâàòüñÿ ñîáñòâåííûå îáúåêòû. Îáúåêò ìîåò ñîäåðàòü ñâîéñòâà è ôóíêöèè.
Ê ñâîéñòâàì îáúåêòà ìîíî ïîëó÷èòü äîñòóï äâóìÿ ñïîñîáàìè. Ïåðâûé ñïîñîá ýòî èåðàðõè÷åñêîå îáðàùåíèå (<object>.<attr> ). òîðîé ñïîñîá ýòî äîñòóï ê îáúåêòó êàê ê ìàññèâó (<object>[<attr>] ). Ïðè äîñòóïå ê ýëåìåíòó îáúåêòà êàê ê ìàññèâó ìîíî îáðàùàòüñÿ êàê ïî èìåíè, òàê è ïî èíäåêñó.
Äëÿ àäðåñàöèè ê òåêóùåìó îáúåêòó èñïîëüçóåòñÿ êëþ÷åâîå ñëîâî <this>. Íàïðèìåð ïðè ïðÿìîì îïèñàíèè îáðàáîò÷èêîâ ñîáûòèé ïî òåêóùåìó îáúåêòó:
Äëÿ îáðàùåíèÿ ê ýëåìåíòàì ðîäèòåëüñêîãî îáúåêòà ìîíî èñïîëüçîâàòü àòðèáóò "parent" (parent.color).
Îïðåäåëåíèå íîâîãî îáúåêòà ïðîèçâîäèòñÿ ïîñðåäñòâîì êëþ÷åâîãî ñëîâà <function>, à ñîçäàíèå ýêçåìïëÿðà îáúåêòà ïîñðåäñòâîì <new>. Ê ýêçåìïëÿðó îáúåêòà ìîíî ñâîáîäíî äîáàâëÿòü íîâûå ñâîéñòâà, ïóò¸ì ïðîñòîãî ïðèñâàèâàíèÿ. Íàïðèìåð:
ñòðîåííûå òèïû îáúåêòîâ
Array -- Îáúåêò ìàññèâà. Ìàññèâ - óïîðÿäî÷åííûé íàáîð çíà÷åíèé, ê êîòîðûì ìîíî îáðàòèòüñÿ ïî èíäåêñó. Ýêçåìïëÿð ìàññèâà ìîíî ñîçäàòü äâóìÿ ñïîñîáàìè, ïóò¸ì óêàçàíèÿ êîëè÷åñòâà ýëåìåíòîâ â ìàññèâå è ïðÿìîãî óêàçàíèÿ ýëåìåíòîâ:
Ñâîéñòâà: length -- ðàçìåð ìàññèâà;
Ìåòîäû:
join() -- ñâÿçûâàíèå âñåõ ýëåìåíòîâ ìàññèâà â ñòðîêó, ÷åðåç çíàê çàïÿòîé;
reverse() -- ðåâåðñ ïîðÿäêà ýëåìåíòîâ â ìàññèâå;
sort() -- ñîðòèðîâêà ýëåìåíòîâ ìàññèâà â ëåêñèêîãðàôè÷åñêîì ïîðÿäêå;
concat() -- äîáàâëåíèå ê ìàññèâó çíà÷åíèé;
splice(<beg>,<end>) -- ïîëó÷åíèå ÷àñòè ìàññèâà íà÷èíàÿ ñ <beg> è çàêàí÷èâàÿ <end>;
push(), pop() -- ðàáîòà ñ ìàññèâîì êàê ñî ñòåêîì;
Boolean -- Äàííûé îáúåêò èñïîëüçóåòñÿ êîãäà íåîáõîäèìî ïðåîáðàçîâàòü íå-boolean çíà÷åíèå â boolean.
Ìåòîäû: valueOf() -- Çíà÷åíèå îáúåêòà.
Date -- Äàòà. Õðàíèò çíà÷åíèå äàòû â ìèëëèñåêóíäàõ ñ 1 ÿíâàðÿ 1970ã, 00:00:00.
Ìåòîäû: <mtm> getTime() -- ïîëó÷åíèå âðåìåíè â ìèëëèñåêóíäàõ ñ 01.01.1970;
setTime(<mtm>) -- óñòàíîâêà âðåìåíè â ìèëëèñåêóíäàõ ñ 01.01.1970;
<dt_part> get[Year]|[Month]|[Day]|[Days]|[Hours]|[Minutes]|[Seconds]() -- ïîëó÷åíèÿ ãîäà, ìåñÿöà, äíÿ íåäåëè, äíÿ ìåñÿöà, ÷àñîâ, ìèíóò è ñåêóíä ñîîòâåòñòâåííî;
set[Year]|[Month]|[Days]|[Hours]|[Minutes]|[Seconds](<dt_part>) -- óñòàíîâêà ãîäà, ìåñÿöà, äíÿ ìåñÿöà, ÷àñîâ, ìèíóò è ñåêóíä ñîîòâåòñòâåííî;
<mtm> parse(dtStr) static -- ïîëó÷åíèå äàòû ïóò¸ì ðàçáîðà ñòðîêè âèäà "November 3, 2007 13:54:00";
Function -- Îáúåêò ôóíêöèè. Èñïîëüçóåòñÿ äëÿ çàêðåïëåíèÿ çà ïåðåìåííîé èëè ñâîéñòâîì ôóíêöèè êàêîé ëèáî ïðîöåäóðû. Ôîðìàò îïðåäåëåíèÿ ýêçåìïëÿðà îáúåêòà ôóíêöèè: functionObjectName = new Function ([<arg1>, <arg2>, ... <argn>,] functionBody) . Ïðèìåð èñïîëüçîâàíèÿ:
Math -- ñòðîåííûé îáúåêò äîñòóïà ê ìàòåìàòè÷åñêèì ôóíêöèÿì è êîíñòàíòàì. ñå åãî ñâîéñòâà è ìåòîäû ÿâëÿþòñÿ ñòàòè÷åñêèìè, à çíà÷èò äîñòóïíû áåç ñîçäàíèÿ ýêçåìïëÿðà îáúåêòà è ïîñðåäñòâîì èìåíè îáúåêòà (Math.PI).
Ñâîéñòâà: PI -- êîíñòàíòà pi (3.14159276);
Ìåòîäû:
abs() -- àáñîëþòíîå çíà÷åíèå;
sin() -- ñèíóñ;
cos() -- êîñèíóñ;
tan() -- òàíãåíñ;
acos() -- àðêêîñèíóñ;
asin() -- àðêñèíóñ;
atan() -- àðêòàíãåíñ;
exp() -- ýêñïîíåíòà;
log() -- íàòóðàëüíûé ëîãàðèôì;
ceil() -- âîçâðàùàåò íàèìåíüøåå öåëîå, áîëüøåå èëè ðàâíîå àðãóìåíòó;
floor() -- âîçâðàùàåò íàèáîëüøåå öåëîå, ìåíüøåå èëè ðàâíîå àðãóìåíòó;
min(), max() -- âîçâðàùàåò ìåíüøåå èëè áîëüøåå (ñîîòâåòñòâåííî) èç äâóõ àðãóìåíòîâ;
pow() -- âîçâåäåíèå â ñòåïåíü, ïåðâûé àðãóìåíò îñíîâàíèå, âòîðîé ïîêàçàòåëü ñòåïåíè;
round() -- îêðóãëÿåò àðãóìåíò äî áëèàéøåãî öåëîãî;
sqrt() -- êâàäðàòíûé êîðåíü.
Number -- Ñîäåðèò ñòàòè÷åñêèå ñâîéñòâà öèôðîâûõ êîíñòàíò.
Ñâîéñòâà: MAX_VALUE -- íàèáîëüøåå çíà÷åíèå;
MIN_VALUE -- íàèìåíüøåå çíà÷åíèå;
NaN -- íåîïðåäåëåííîñòü;
NEGATIVE_INFINITY -- îòðèöàòåëüíàÿ áåñêîíå÷íîñòü;
POSITIVE_INFINITY -- ïîëîèòåëüíàÿ áåñêîíå÷íîñòü.
Ìåòîäû:
toFixed(<num>) -- Îêðóãëåíèå ÷èñëà äî óêàçàííîãî çíàêà ïîñëå çàïÿòîé.
toString(<base>) -- Ïðåîáðàçîâàíèå â ñòðîêó ñ óêàçàííîé áàçîé (2-36).
String -- Îáúåêò äëÿ ðàáîòû ñî ñðîêàìè â ïðèëîåíèÿõ. Ôàêòè÷åñêè äàííûé îáúåêò ïðåäñòàâëÿåò ñòðîêîâûå ëèòåðàëû è ïåðåìåííûå ñòðîêîâîãî òèïà, à çíà÷èò åãî ñâîéñòâà è ìåòîäû õàðàêòåðíû äëÿ íèõ.
Ñâîéñòâà: Ìåòîäû:
<str> anchor() -- ñîçäàåò HTML-ÿêîðü;
<str> big() | blink() | bold() | fixed() | italics() | small() | strike() | sub() | sup() -- ñîçäàåò ñòðîêó HTML, ñîîòâåòñòâóþùåãî âèäà;
<el> charAt(<simb>) -- âîçâðàùàåò ñèìâîë ïî åãî íîìåðó â ñòðîêå;
<pos> indexOf(<substr>) | lastIndexOf(substr) -- âîçâðàùàþò ïåðâóþ (ïîñëåäíþþ) ïîçèöèþ ñïåöèôèöèðîâàííîé ïîäñòðîêè;
<str> link(<addr>) -- ñîçäàåò ãèïåðòåêñòîâóþ ññûëêó äëÿ àäðåñà <addr> ;
<array> split(<sep>) -- ðàçáèâàåò îáúåêò String íà ìàññèâ ïîäñòðîê ïî ðàçäåëèòåëþ <sep>;
<str> substring(<pos>,<len>) -- èçâëåêàåò ïîäñòðîêó èç ñòðîêè íà÷èíàÿ ñ ïîçèöèè <pos> è äëèíîé <len>;
<str> toLowerCase() | toUpperCase() -- âîçâðàùàåò ñòðîêó â íèíåì èëè âåðõíåì ðåãèñòðå, ñîîòâåòñòâåííî.
Ãëîáàëüíûå ñâîéñòâà è ìåòîäû
self, window -- ññûëêà íà îáúåêò òåêóùåãî îêíà/ôðåéìà;
top -- ññûëêà íà îáúåêò ñàìîãî âåðõíåãî îêíà;
parent -- ññûëêà íà ðîäèòåëüñêèé îáúåêò;
{winName} -- ãëîáàëüíîå èìÿ îêíà, èñïîëüçóåìîå äëÿ ïðÿìîé àäðåñàöèè ê íåìó;
<bool> isNaN(<val>) -- îöåíêà àðãóìåíòà íà íåîïðåäåëåííîñòü;
<str> toString(<obj>) -- ïðåîáðàçîâàíèå îáúåêòà â ñòðîêó;
<tid> setTimeout(<call_func>,<tm>) -- óñòàíîâêà èíòåðâàëà <tm>, â ìèëëèñåêóíäàõ, ïî èñòå÷åíèþ êîòîðîãî âûçâàòü ôóíêöèþ <call_func>;
clearTimeout(<tid>) -- îñòàíîâ ðàíåå ñîçäàííîãî èíòåðâàëüíîãî âûçîâà ñ èäåíòèôèêàòîðîì <tid>;
<numb> parseInt(<str>[,<radix>]) -- ïðåîáðàçîâàíèå ñòðîêè <str> ê öåëîìó ñ îñíîâàíèåì <radix>;
<numb> parseFloat(<str>) -- ïðåîáðàçîâàíèå ñòðîêè ê âåùåñòâåííîìó;
<rez> eval(<str>) -- âû÷èñëåíèå âûðàåíèÿ â str è âîçâðàò ðåçóëüòàòà â <rez>.
Èåðàðõèÿ îáúåêòîâ áðàóçåðà
window -- êîðíåâîé îáúåêò îêíà;
status -- ñîäåðèìîå è äîñòóï ê ñòðîêå ñòàòóñà;
alert(<string>) -- ñôîðìèðîâàòü äèàëîãîâîå îêíî ñ ïðåäóïðåäåíèåì;
confirm(<string>) -- ñôîðìèðîâàòü äèàëîãîâîå îêíî ïîäòâåðäåíèÿ ñ êíîïêàìè: "Ok" è "Cancel";
prompt(<string>) -- ñôîðìèðîâàòü äèàëîãîâîå îêíî ñ ïîëåì ââîäà çíà÷åíèÿ;
<wid> open(<url>,<title>,<add_params>) -- îòêðûòèå íîâîãî îêíà äëÿ <url> ñ íàçâàíèåì <title> è ãðóïïîé äîïîëíèòåëüíûõ ïàðàìåòðîâ <add_params> (width=400,height=150). Äîïîëíèòåëüíûå ïàðàìåòðû: width , height , status =no, menu , toolbar =yes;
close() -- çàêðûòèå îêíà;
focus() -- óñòàíîâêà ôîêóñà íà äàííîå îêíî;
blur() -- ñíÿòèå ôîêóñà ñ äàííîãî îêíà;
scroll() -- ïðîêðóòêà îêíà ê óêàçàííîé ïîçèöèè;
window.location -- URL ñòðàíèöû äàííîãî îêíà, ìîåò áûòü èçìåíåí äëÿ ïåðåõîäà íà äðóãóþ ñòðàíèöó;
href -- ïîëíûé òåêñò URL;
protocol -- ïðîòîêîë URL;
host -- àäðåñ ñåðâåðà;
pathname -- àäðåñ ê ðåñóðñó;
search -- àòðèáóòû çàïðîñà.
window.navigator -- îáúåêò áðàóçåðà;
window.navigator.plugms[] -- ïðîãðàììû áðàóçåðà;
window.navigator.mimeTypes[] -- ïîääåðèâàåìûå MIME-òèïû;
window.frames[] -- ôðåéìû îêíà è ñàìè îêíà;
location -- URL ôðåéìà, ìîåò áûòü èçìåíåí äëÿ îòîáðàåíèÿ äðóãîé ñòðàíèöû;
window.history -- èñòîðèÿ âèçèòîâ;
window.document -- äîêóìåíò;
bgColor, fgColor, linkColor, alinkColor, è vlinkColor -- ñâîéñòâà ãëîáàëüíûõ öâåòîâ äîêóìåíòà;
lastModified -- äàòà ïîñëåäåíåé ìîäèôèêàöèè äîêóìåíòà;
referrer -- ïðåäûäóùèé ïî÷åùàåìûé URL;
URL -- URL äîêóìåíòà;
open() -- îòêðûòèå äîêóìåíòà îêíà äëÿ çàïèñè â íåãî;
close() -- çàêðûòèå äîêóìåíòà íà çàïèñü;
write(<str_el1>[,<str_el2>[,<str_el3>,...,<str_eln>]]) -- çàïèñü ñòðîêè, ñîñòîÿùåé èç ýëåìåíòîâ <str_el{x}> â êîíåö äîêóìåíòà, èñïîëüçóåòñÿ äëÿ äèíàìè÷åñêîãî ôîðìèðîâàíèÿ äîêóìåíòà;
writeln(<str_el1>[,<str_el2>[,<str_el3>,...,<str_eln>]]) -- âûïîëíÿåò òóå ôóíêöèþ, ÷òî è ôóíêöèÿ <write>, à òàêå äîáàâëÿåò ïåðåâîä ñòðîêè â êîíöå ñòðîêè;
window.document.forms[] -- ôîðìû äîêóìåíòà;
document -- ññûëêà íà îáúåêò äîêóìåíòà-âëàäåëüöà.
window.document.forms[].elements[] -- ýëåìåíòû ôîðìû;
form -- ññûëêà íà îáúåêò ôîðìû-âëàäåëüöà.
window.document.anchors[] -- ÿêîðÿ (ññûëêè) äîêóìåíòà;
window.document.links[] -- ññûëêè äîêóìåíòà;
window.document.images[] -- èçîáðàåíèÿ äîêóìåíòà;
window.document.applets[] -- àïëåòû äîêóìåíòà;
window.document.embeds[] -- ???
window.packages[] -- ïàêåòû.
window.event -- ãëîáàëüíûé îáúåêò ñîáûòèé Event
type -- òèï ñîáûòèÿ (keydown, ;
target -- óçåë - èñòî÷íèê ñîáûòèÿ;
currentTarget -- óçåë - îáðàáîò÷èê ñîáûòèÿ;
timeStamp -- âðåìÿ âîçíèêíîâåíèÿ ñîáûòèÿ (îáúåêò Date);
button -- íîìåð êíîïêè ìûøè (0-ëåâàÿ,1-ñðåäíÿÿ,2-ïðàâàÿ);
altKey, ctrlKey, metaKey, shiftKey -- ïðèçíàêè óäåðàíèÿ êëàâèøè ìîäèôèêàòîðà â ìîìåíò êëèêà ìûøüþ;
clientX, clientY -- ïîëîåíèå êóðñîðà ìûøè îòíîñèòåëüíî êëèåíòñêîé îáëàñòè;
pageX, pageY -- ïîëîåíèå êóðñîðà ìûøè îòíîñèòåëüíî ëåâîãî âåðõíåãî óãëà îêíà (NN);
screenX, screenY -- ïîëîåíèå êóðñîðà ìûøè îòíîñèòåëüíî ýêðàíà;
offsetX, offsetY -- ïîëîåíèå êóðñîðà ìûøè îòíîñèòåëüíî èñõîäíîãî ýëåìåíòà (IE);
keyCode -- êîä íààòîé êëàâèøè (IE);
which -- êíîïêà ìûøè èëè êîä íààòîé êëàâèøè (NN).
Ïðèëîåíèå Ñòðóêòóðà URL (Unifical resource locator)
îáùåì âèäå Unifical resource locator(URL) çàïèñûâàåòñÿ ñëåäóþùèì îáðàçîì:
http://user:password@domain.ru:port/path/some.html?query_string
ãäå:
http -- ïðîòîêîë îáìåíà äàííûìè (Hyper Text Transfer Protocol);
user -- èäåíòèôèêàòîð ïîëüçîâàòåëÿ;
password -- ïàðîëü;
domain.ru -- äîìåííîå èìÿ ñåðâåðà;
port -- íîìåð TCP-ïîðòà ñåðâåðà;
path -- ïóòü â êîðíåâîì êàòàëîãå ñåðâåðà ê ðåñóðñó;
some.html -- ðåñóðñ;
query_string -- ïàðàìåòð çàïðîñà.
CER (Character Entity Reference)
CER (Character Entity Reference) - ñîãëàøåíèå î êîäèðîâàíèè è ïðåäñòàâëåíèè ñïåöèàëüíûõ ñèìâîëîâ:
×èñëîâîé êîä Èìåííàÿ çàìåíà Ñèìâîë Îïèñàíèå
" " " Êàâû÷êà
& & & ìïåðñàíò
< < < Ìåíüøå
> > > Áîëüøå
  Íåðàçðûâíûé ïðîáåë
¡ ¡ ¡ Ïåðåâåðíóòûé âîñêëèöàòåëüíûé çíàê
¢ ¢ ¢ Öåíò
£ £ £ Ôóíò
¤ ¤ ¤ àëþòà
¥ ¥ ¥ Éåíà
¨ ¨ ¨ Óìëÿóò
© © © Êîïèðàéò
« « « Ëåâàÿ óãëîâàÿ êàâû÷êà
® ® ® Çàðåãèñòðèðîâàííàÿ òîðãîâàÿ ìàðêà
± ± ± Ïëþñ èëè ìèíóñ
» » » Ïðàâàÿ óãëîâàÿ êàâû÷êà
Öâåòà è èõ êîäû
Öâåò Êîä
aqua #00FFFF
navy #000080
black #000000
olive #808000
blue #0000FF
purple #800080
fuchsia #FF00FF
red #FF0000
gray #808080
silver #C0C0C0
green #008000
teal #008080
lime #00FF00
white #FFFFFF
maroon #800000
yellow #FFFF00
Åäèíèöû ðàçìåðîâ
Ðàçìåðû â äîêóìåíòå HTML/XHTML/XML ìîíî óêàçûâàòü íåñêîëüêèìè ñïîñîáàì.
Åäèíèöà Îïèñàíèå
100px Ïèêñåëû (100 ïèêñåëîâ)
50pt Òèïîãðàôè÷åñêèå ïóíêòû (50 ïóíêòîâ, 1pt = 0,35mm)
10em Óñëîâíûå åäèíèöû (10 óñëîâíûõ åäèíèö)
100% ïðîöåíòàõ îò îïîðíîé âåëè÷èíû
Øðèôòû
Ñåìåéñòâà øðèôòîâ:
Øðèôò Îïèñàíèå
serif Øðèôò ñ çàñå÷êàìè (Times)
sans-serif Øðèôò áåç çàñå÷åê (Arial, Helvetica)
monospace Ìîíî-øèðèííûé (Courier)
Ëèòåðàòóðà
1. Á.Ï. Õðàìöîâ, Ñ..Áðèê, .Ì.Ðóñàê, .È.Ñóðèí; "Îñíîâû WEB-òåõíîëîãèé."; Èíòåðíåò-Óíèâåðñèòåò; Ìîñêâà; 2003
2. Ìîëëè Ý. Õîëüöøëàã; "Èñïîëüçîâàíèå HTML è XHTML. Ñïåöèàëüíûé ñïðàâî÷íèê."; èëüÿìñ; Ìîñêâà, Ñàíêò-Ïåòåðáóðã, Êèåâ: 2003