white

英 [wa?t]? ?美 [hwa?t, wa?t]??

adj.白色的,純潔的;無(wú)色的,透明的;白衣的;白種人的

n.白色;白種人;空白;白色顏料

vt.(書(shū)寫(xiě),印刷等)留出空白處;使變白色,刷白;漂白

第三人稱(chēng)單數(shù): whites 復(fù)數(shù): whites 現(xiàn)在分詞: whiting 過(guò)去式: whited 過(guò)去分詞: whited 比較級(jí): whiter 最高級(jí): whitest

space

英 [spe?s]? ?美 [ spes]??

n.空間,太空;空白,間隔;空隙;片刻

vt.把…分隔開(kāi),留間隔于…之間

vi.以一定間隔排列

第三人稱(chēng)單數(shù): spaces 復(fù)數(shù): spaces 現(xiàn)在分詞: spacing 過(guò)去式: spaced 過(guò)去分詞: spaced

javascript whiteSpace屬性 語(yǔ)法

作用:設(shè)置如何處理文本中的空白符(比如空格和換行符)。

語(yǔ)法:Object.style.whiteSpace=normal|nowrap|pre

javascript whiteSpace屬性 示例

<html>
<head>
<script type="text/javascript">
function removeWrapping()
{
document.getElementById("div1").style.whiteSpace="nowrap";
}
</script>
</head>
<body>

<div id="div1">
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.
This is some text. This is some text. This is some text.
</div>
<br />
<input type="button" onclick="removeWrapping()" 
value="Do not let the text wrap" />

</body>
</html>

運(yùn)行實(shí)例 ?

點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線(xiàn)實(shí)例