欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

HTML DOM display 屬性

HTML DOM Style 對象

定義和用法

display 屬性設(shè)置元素如何顯示。

語法:

Object.style.display=value

Possible Values

描述
none 此元素不會被顯示。
block 此元素將顯示為塊級元素,此元素前后會帶有換行符。
inline 默認(rèn)。此元素會被顯示為內(nèi)聯(lián)元素,元素前后沒有換行符。
list-item 此元素會作為列表顯示。
run-in 此元素會根據(jù)上下文作為塊級元素或內(nèi)聯(lián)元素顯示。
compact 此元素會根據(jù)上下文作為塊級元素或內(nèi)聯(lián)元素顯示。
marker
table 此元素會作為塊級表格來顯示(類似 <table>),表格前后帶有換行符。
inline-table 此元素會作為內(nèi)聯(lián)表格來顯示(類似 <table>),表格前后沒有換行符。
table-row-group 此元素會作為一個或多個行的分組來顯示(類似 <tbody>)。
table-header-group 此元素會作為一個或多個行的分組來顯示(類似 <thead>)。
table-footer-group 此元素會作為一個或多個行的分組來顯示(類似 <tfoot>)。
table-row 此元素會作為一個表格行顯示(類似 <tr>)。
table-column-group 此元素會作為一個或多個列的分組來顯示(類似 <colgroup>)。
table-column 此元素會作為一個單元格列顯示(類似 <col>)
table-cell 此元素會作為一個表格單元格顯示(類似 <td> 和 <th>)
table-caption 此元素會作為一個表格標(biāo)題顯示(類似 <caption>)

實例

本例設(shè)置不顯示元素:

<html>
<head>
<script type="text/javascript">
function removeElement()
{
document.getElementById("p1").style.display="none";
}
</script>
</head>
<body>

<h1>Hello</h1>

<p id="p1">This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.</p>

<input type="button" onclick="removeElement()"
value="Do not display paragraph" />

</body>
</html>

HTML DOM Style 對象