ÁöµM§Ú̦b
¼ÐÅÒÀÀ LAYER ¤Æ¤@¤å¤¤´£¨ì¦b Netscape ¤¤¡A¥iÉ¥Ñ
³]©w CSS position ÄÝ©Ê¨Ó¨Ï HTML Block-Level ¼ÐÅÒÀÀ Layer ¤Æ¡C¦ý§ÚÌ«on¤À
²M·¡¡ACSS background-color ©Ò¶ñ¶îªº¡A©M Layer bgColor ©Ò¶ñ¶îªº¬O¤£¦Pªº°Ï°ì¡A
¦Ó¤£ºÞ¥¦Ì쥻¬O¼Ð·Çªº layer ¤¸¥ó¡A©ÎÀÀ layer ¤¸¥ó¡CÄ´¦p§A¥i¥H³o»ò³]©w HTML
¡G
<DIV ID="layer1" STYLE="position:relative;
background-color:yellow;left:2em;top:1em;width:10em;height:4em;">
¶À¦â¬O background-color ¶ñ¶î½d³ò
</DIV>
<!-- ¥ý¥Î¶À¦â°µ©³¦â¨Ó¶ñ¶îÀÀ Layer ¤¸¥óI´º°Ï // -->
¦A¥Î Script ±Ôz¬°ÀÀ Layer ¤¸¥ó¶î¤W bgColor ©³¦â¡G
var turn=false;
function ChangeBlockbgColor()
{
turn=!turn;
var cvalue=(turn)?"green":null;
if (document.layers) {document.layers.layer1.bgColor=cvalue;}
/* ±NÀÀ layer ¤¸¥óªº bgColor ¶î¦¨ºñ¦â */
}
µ²ªG½Ð«ö
³oùØ¡C
¦ý¦pªG§Ú̦b Netscape ¤¤§ï¥Î¼Ð·Çªº LAYER ©M ILAYER ¼ÐÅÒ°t¦X CSS background-color
ªº³]©w¦p¤U¡G
<ILAYER ID="layer1" STYLE="position:relative;
background-color:yellow;left:2em;top:1em;width:10em;height:4em;">
¶À¦â¬O background-color ¶ñ¶î½d³ò
</ILAYER>
<!-- ¥ý¥Î¶À¦â°µ©³¦â¨Ó¶ñ¶îÀÀ Layer ¤¸¥óI´º°Ï // -->
µ²ªG´N·|Åܦ¨
³o¼Ë¡C
¦]¬°³o¨Ç®t²§¡A©Ò¥H§ÚÌn°ÊºA§ïÅÜ Netscape ¤¤ layer ¤¸¥óªº background-color
©M bgColor ®É¡Anª`·N³o¨Ç®t²§¡C