white

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

adj.白色的,純潔的;無色的,透明的;白衣的;白種人的

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

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

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

space

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

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

vt.把…分隔開,留間隔于…之間

vi.以一定間隔排列

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

javascript whiteSpace屬性 語法

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

語法: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í)例" 按鈕查看在線實(shí)例