Å×À̺íÀÇ ÁÙ(row)°ú Ä(cell)ÀÇ Åµθ®(border)°¡ ´ÜÀÏ Å׵θ®·ÎµÇ´Â°¡ HTML Ç¥ÁØÀ¸·Î µÇ´Â°¡¸¦ ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
| separate | µðÆúÆ®À̸ç, Å׵θ®°¡ Ç¥ÁØ HTML ¹æ½ÄÀ¸·Î Ç¥ÇöµÈ´Ù. |
| collapse | ÀÎÁ¢ İú Á¢¼ÓµÈ Å׵θ®°¡ ºØ±«µÇ°í ´ÜÀÏ Å׵θ®·Î Ç¥ÇöÇÑ´Ù. |
ÀÌ ¼Ó¼ºÀº currentStyle¿¡¼´Â ÀбâÀü¿ëÀ̰í, ±×¿ÜÀÇ °³Ã¼¿¡¼´Â Àбâ/¾²±âÀ̸ç, µðÆúÆ®°ªÀº separateÀÌ´Ù.
CSS(Cascading Style Sheets) ¾ÖÆ®¸®ºäÆ®´Â »ó¼ÓµÇÁö ¾Ê´Â´Ù.
| °³Ã¼ | script | CSS | IE ¹öÀü |
|---|
ÀÌ ¼Ó¼ºÀº CSS2(Cascading Style Sheets Level 2)¿¡ Á¤ÀǵǾú´Ù.
| Àû¿ë | Object | currentStyle |
| Object | runtimeStyle | |
| Object | style | |
| Element | TABLE |
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>