Å×À̺íÀÇ ÁÙ(row)°ú Ä­(cell)ÀÇ Åµθ®(border)°¡ ´ÜÀÏ Å׵θ®·ÎµÇ´Â°¡ HTML Ç¥ÁØÀ¸·Î µÇ´Â°¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.

Àμö
cssSelector : (½ºÅ¸ÀÏ ¼±ÅÃÀÚ)
¼Ó¼ºÀ» °¡Áú¼ö ÀÖ´Â ¿¤·¹¸àÆ®()³ª Ŭ¶ó½º(class) À̸§ ȤÀº ÀνÄÀÚ(id)ÀÌ´Ù.

: (¼Ó¼º ¹®ÀÚ¿­)
½ºÅ¸ÀÏ ¼Ó¼ºÀº °³Ã¼ÀÇ Å×À̺íÀÇ ÁÙ(row)°ú Ä­(cell)ÀÇ Åµθ®(border)°¡ ºØ±«µÇ¾î ´ÜÀÏ Å׵θ®·ÎµÇ´Â°¡ HTML Ç¥ÁØÀ¸·Î µÇ´Â°¡¸¦ ³ªÅ¸³»´Â ¹®ÀÚ¿­ÀÌ´Ù.

separate µðÆúÆ®À̸ç, Å׵θ®°¡ Ç¥ÁØ HTML ¹æ½ÄÀ¸·Î Ç¥ÇöµÈ´Ù.
collapse ÀÎÁ¢ Ä­°ú Á¢¼ÓµÈ Å׵θ®°¡ ºØ±«µÇ°í ´ÜÀÏ Å׵θ®·Î Ç¥ÇöÇÑ´Ù.

ÀÌ ¼Ó¼ºÀº currentStyle¿¡¼­´Â ÀбâÀü¿ëÀÌ°í, ±×¿ÜÀÇ °³Ã¼¿¡¼­´Â Àбâ/¾²±âÀ̸ç, µðÆúÆ®°ªÀº separateÀÌ´Ù.

CSS(Cascading Style Sheets) ¾ÖÆ®¸®ºäÆ®´Â »ó¼ÓµÇÁö ¾Ê´Â´Ù.

Àû¿ë
°³Ã¼scriptCSS IE ¹öÀü
ÂüÁ¶
border

ÀÌ ¼Ó¼ºÀº CSS2(Cascading Style Sheets Level 2)¿¡ Á¤ÀǵǾú´Ù.


Àû¿ë ObjectcurrentStyle
ObjectruntimeStyle
Objectstyle
ElementTABLE

tableObj.style.borderCollapse :

°á°ú Ç¥½Ãâ
<SCRIPT>
function showAll(){
  str='tableObj.style.borderCollapse=<FONT color=blue>'+tableObj.style.borderCollapse+'</FONT><BR>';
  str+='tableObj.currentStyle.borderWidth=<FONT color=blue>'+tableObj.currentStyle.borderWidth+'</FONT><BR>';
  str+='tableObj.currentStyle.borderStyle=<FONT color=blue>'+tableObj.currentStyle.borderStyle+'</FONT><BR>';
  str+='tableObj.currentStyle.borderColor=<FONT color=blue>'+tableObj.currentStyle.borderColor+'</FONT><BR>';
  str+='tableObj.currentStyle.width=<FONT color=blue>'+tableObj.currentStyle.width+'</FONT><BR>';
  str+='tableObj.currentStyle.height=<FONT color=blue>'+tableObj.currentStyle.height+'</FONT><BR>';
  showA.innerHTML=str;
}
</SCRIPT>
<TABLE id="tableObj" style="border-collapse:collapse" border="10" cellpadding="10" cellspacing="10" bgcolor="#ffffaa" width="400">
<COL><COL><COL style=background-color:ffe>
<TR><TD rowspan=4>Àû¿ë</TD>
<TD>Object</TD><TD>currentStyle</TD></TR>
<TR><TD>Object</TD><TD>runtimeStyle</TD></TR>
<TR><TD>Object</TD><TD>style</TD></TR>
<TR><TD>Element</TD><TD>TABLE</TD></TR>
</TABLE>
<P>tableObj.style.borderCollapse :
<BUTTON onclick="tableObj.style.borderCollapse='separate';showAll()">separate</BUTTON>
<BUTTON onclick="tableObj.style.borderCollapse='collapse';showAll()">collapse</BUTTON>
<DIV id=showA>°á°ú Ç¥½Ãâ</DIV>