HTML DOM borderCollapse ÊôÐÔ

HTML DOM Style ¶ÔÏó

¶¨ÒåºÍÓ÷¨

borderCollapse ÊôÐÔÉèÖñí¸ñµÄ±ß¿òÊÇ·ñ±»ºÏ²¢ÎªÒ»¸öµ¥Ò»µÄ±ß¿ò£¬»¹ÊÇÏóÔÚ±ê×¼µÄ HTML ÖÐÄÇÑù·Ö¿ªÏÔʾ¡£

Óï·¨£º

Object.style.borderCollapse=collapse|separate

¿ÉÄܵÄÖµ

Öµ ÃèÊö
separate ±ß¿ò»á±»·Ö¿ª¡£
collapse ĬÈÏ¡£Èç¹û¿ÉÄÜ£¬±ß¿ò»á±»ºÏ²¢ÎªÒ»¸öµ¥Ò»µÄ±ß¿ò¡£

ʵÀý

ÏÂÃæµÄÀý×Ӻϲ¢±í¸ñ±ß¿ò£º

<html>
<head>
<script type="text/javascript">
function setBorderCollapse()
{
document.getElementById('myTable').style.borderCollapse="collapse"
}
</script>
</head>
<body>

<table border="1" id="myTable">
  <tr>
    <td>100</td>
    <td>200</td>
  </tr>
  <tr>
    <td>300</td>
    <td>400</td>
  </tr>
</table>
<br />
<input type="button" onclick="setBorderCollapse()"
value="Collapse border">

</body>
</html>

HTML DOM Style ¶ÔÏó

VUE