Начало
Разное
Слои
Вот прекрасный пример новейшей особенности Netscape - слои. Слои могут по-видимому "пустить в ход" объекты вокруг этого экрана, картин, таблиц, текста, и т.д.
o
o
o
o
o
o
o
o
hide all
show all
JavaScript разное:Слои
<!-- THREE STEPS TO INSTALL LAYERS: 1. Paste the first code in the HEAD of your HTML document 2. Copy the onLoad event handler into the BODY tag 3. Add the last code in the BODY of your HTML document --> <!-- STEP ONE: Paste the first code in the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <! > <! > <!-- Begin function doit() { right_box1(); } function hideit() { document.box1.visibility="hide" document.box2.visibility="hide" document.box3.visibility="hide" document.box4.visibility="hide" document.box5.visibility="hide" document.box6.visibility="hide" document.box7.visibility="hide" document.box8.visibility="hide" } function showit() { document.box1.visibility="show" document.box2.visibility="show" document.box3.visibility="show" document.box4.visibility="show" document.box5.visibility="show" document.box6.visibility="show" document.box7.visibility="show" document.box8.visibility="show" } function right_box1() { move1(); if (document.box1.left<150) setTimeout("right_box1()",10); if (document.box1.left>=150) setTimeout("down_box1()",5); } function down_box1() { move2(); if (document.box1.top<230) setTimeout("down_box1()",5); if (document.box1.top>=230) setTimeout("left_box1()",10); } function left_box1() { move3(); if (document.box1.left>150) setTimeout("left_box1()",10); if (document.box1.left<=150) setTimeout("up_box1()",5); } function up_box1() { move4(); if (document.box1.top>120) setTimeout("up_box1()",5); if (document.box1.top<=120) setTimeout("right_box1()",10); } function move1() { document.box1.offset(10,2) document.box2.offset(5,1) document.box3.offset(-10,2) document.box4.offset(-5,1) document.box5.offset(10,-2) document.box6.offset(5,-1) document.box7.offset(-10,-2) document.box8.offset(-5,-1) } function move2() { document.box1.offset(6,6) document.box2.offset(6,7) document.box3.offset(-6,6) document.box4.offset(-6,7) document.box5.offset(6,-6) document.box6.offset(6,-7) document.box7.offset(-6,-6) document.box8.offset(-6,-7) } function move3() { document.box1.offset(-10,-2) document.box2.offset(-5,-1) document.box3.offset(10,-2) document.box4.offset(5,-1) document.box5.offset(-10,2) document.box6.offset(-5,1) document.box7.offset(10,2) document.box8.offset(5,1) } function move4() { document.box1.offset(-6,-6) document.box2.offset(-6,-7) document.box3.offset(6,-6) document.box4.offset(6,-7) document.box5.offset(-6,6) document.box6.offset(-6,7) document.box7.offset(6,6) document.box8.offset(6,7) } // End --> </script> <BODY onLoad="doit()"> <!-- STEP THREE: Add the last code in the BODY of your HTML document --> <BODY>
o
o
o
o
o
o
o
o
hide all
show all
<!-- Script Size: 4.32 KB -->