.


:




:

































 

 

 

 


var foo; // foo undefined




Object ()

. .

var myObj = {'pr_1': 'string', 'pr_2': 2, 'pr_3': false};

, .

, , , , . .

JavaScript ("_"), / . , JavaScript .

. - , "=", , x = 42.

var. , , .

:

;

.

, JavaScript , , . .

. , . : . - , , . , 0 7. 0x ( 0X), , , , 0 9 a - f A - F, , 10 - 15.

. .

. , , , : true () false ().

. , (") ('). : "", ' ', "4321", " \n ".

Array - . . (). JavaScript .

, :

DayNames=new Array ("", "", "",

"", "", "", "");

:

_ []

alert (DayNames[0]);

, "".

-:

DayNames=new Array (7); //

// .

DayNames[0] = "";

DayNames[1] = "";

......

DayNames[6] = "";

, , JavaScript . JavaScript, .. .

escape (<>) URL-, .., , ,
eval(<>) , <>,
isFinite(<>) , <> . false , <> . - true
isNaN(<>) true, <> (.. , NaN (Not a Number) - ), false -
parseFloat(<>) <> . <> , NaN
parseInt (<>,<>) <> , <>. . <> , NaN
unescape(<>) , escape

 

/.

confirm() OK (Cancel). :

s=confirm();

prompt(), :

x=prompt(, );

if else.

if (<>)

<1>;

else

<2>;

:

if (<>) <1>;

. , 1. , else-, 2. , else ( ), , .

1 2 , :

if (<>)

{ <1>; <2>;... <N>; }

if . , . , . , .

switch.

switch (<>)

{ case <1>: <1>

break;

case <2>: <2>

break;

.......

case <N>: <N>

break;

default: <M> }

, . break default .

switch . . , case, , default. , default , switch.

switch ( , - ) break , switch. break , case .

( while)

while . , . , . :

while (<>)

{ <1>;

<2>;

.....

<N>; }

, . , , , . .

, .

( do-while)

while do-while , . , . , while.

do

{ <1>;

<2>;

.....

<N>; }

while (<>);

( for)

for , , . for , , . .

for (< >;< >;<>)

{ <1>;

<2>;

.....

<N>; }

. true, , .

Microsoft Internet Explorer

, Windows-, Automation, - . , , . , -, Internet Explorer, , -, , " " ( "" ) "" ( - ) .

window, . window.

. , , , . , forms, (, , , ) form.

, frames. ( frame), document, , , .

location URL-. navigator . history ( ), . , .

links . anchors , . forms ( ). form, , elements, , (, , ..).

, Window

window () . , " " ; - , ; - , " " - ( , ..). , - , HTML- . . - HTML-, . , " ".

defaultStatus .
document document .
self .
status .
frames ( ) .
name
parent .
top window.
dialogTop dialogLeft dialogHeight dialogWidth Y, X, ( ), showModalDialog.
alert (<>); OK.
<>= confirm(<>); OK Cancel. true( OK) false ( Cancel).
<>= prompt(< >, < >); , . OK, . Cancel - null ().
focus(); .
blur(); .
close(); .
<>=setInterval (<>, < >); .
<>=setTimeout(<>, <>); , ( ). clearTimeout.
clearTimeout (<>); , .
clearInterval (<>); , setInterval.
open (<URL->,< >, <>); HTML- . :
  • directories=Yes No - ;
  • height= - ;
  • width= - ;
  • location=yes no - ;
  • menuBar=yes no - ;
  • resizable=yes no - ;
  • scrollbars=yes no - ;
  • status=yes no - ;
  • toolBar=yes no - .
execScript (<>, < >); . ( "VBScript" "JavaScript") .
showModalDialog (<URL->, <>, <>); HTML-. .
navigate (<URL->); .
showHelp (<URL->, <>); .
onload(); .
onunload(); .
onresize(); .
onscroll(); .
onfocus(); .
onblur(); .
onhelp(); F1, .

 





:


: 2016-12-18; !; : 507 |


:

:

, .
==> ...

1472 - | 1384 -


© 2015-2024 lektsii.org - -

: 0.025 .