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

HTML DOM whiteSpace 屬性

HTML DOM Style 對象

定義和用法

whiteSpace 屬性設(shè)置如何處理文本中的空白符(比如空格和換行符)。

語法:

Object.style.whiteSpace=normal|nowrap|pre

可能的值

描述
normal 默認(rèn)?瞻讜粸g覽器忽略。
pre 空白會被瀏覽器保留。其行為方式類似 HTML 中的 <pre> 標(biāo)簽。
nowrap 文本不會換行,文本會在在同一行上繼續(xù),直到遇到 <br> 標(biāo)簽為止。

實例

本例不允許在文本內(nèi)換行:

<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>

HTML DOM Style 對象