padding, paddingTop, paddingBottom, paddingLeft, paddingRight ¼Ó¼º ¿¹Á¦
°á°ú Ç¥½Ãâ
¸¶¿ì½º¸¦ ¿Ã·Áº¸¶ó. onmouseover, onmouseout À̺¥Æ®·Î ÆеùÀ» º¯°æ½ÃŲ´Ù. <STYLE>.test1class {padding:1cm 2cm 3cm 4cm}</STYLE> <SCRIPT> function ShowResult(){ str='<TABLE border=1 width=700><TR><TD>'; str+='<TABLE border=1 width=100%>'; str+='<TR><TD>td1Obj.currentStyle.padding='+td1Obj.currentStyle.padding+'</TD></TR>'; str+='<TR><TD>td1Obj.currentStyle.paddingTop='+td1Obj.currentStyle.paddingTop+'</TD></TR>'; str+='<TR><TD>td1Obj.currentStyle.paddingBottom='+td1Obj.currentStyle.paddingBottom+'</TD></TR>'; str+='<TR><TD>td1Obj.currentStyle.paddingLeft='+td1Obj.currentStyle.paddingLeft+'</TD></TR>'; str+='<TR><TD>td1Obj.currentStyle.paddingRight='+td1Obj.currentStyle.paddingRight+'</TD></TR>'; str+='</TABLE></TD>'; str+='<TD><TABLE border=1 width=100%>'; str+='<TR><TD>td2Obj.currentStyle.padding='+td2Obj.currentStyle.padding+'</TD></TR>'; str+='<TR><TD>td2Obj.currentStyle.paddingTop='+td2Obj.currentStyle.paddingTop+'</TD></TR>'; str+='<TR><TD>td2Obj.currentStyle.paddingBottom='+td2Obj.currentStyle.paddingBottom+'</TD></TR>'; str+='<TR><TD>td2Obj.currentStyle.paddingLeft='+td2Obj.currentStyle.paddingLeft+'</TD></TR>'; str+='<TR><TD>td2Obj.currentStyle.paddingRight='+td2Obj.currentStyle.paddingRight+'</TD></TR>'; str+='</TABLE>'; str+='</TD></TR></TABLE>'; showB.innerHTML=str; } </SCRIPT> </HEAD> <BODY> <TABLE align=center width=700> <TR> <TD> <TABLE border=1 align=center bgcolor=ffffaa> <COL style=padding:2cm> <TR align=middle> <TD id=td1Obj onmouseover="this.className='test1class';ShowResult();" onmouseout="this.className='';ShowResult()"> td1Obj <IMG src="../../../gif/rfsample.gif"> </TD> <TD id=td2Obj onmouseover="this.style.padding='4cm 3cm 2cm 1cm';ShowResult();" onmouseout="this.style.padding='';ShowResult();"> td2Obj <IMG src="../../../gif/rfsample.gif"> </TD> </TR> </TABLE> </TD> </TR> </TABLE> <DIV id=showB>°á°ú Ç¥½Ãâ</DIV> |