HBCMS更多的中文手册参考:

WRAP Attribute | wrap参数属性

DHTML文档教程

Sets or retrieves how to handle wordwrapping in the object.

dhtml语法

HTML<ELEMENT WRAP = sWrap... >
Scriptingobject.wrap [ = sWrap ]

DHTML可能的值

sWrapString that specifies or receives one of the following values.
softDefault. Text is displayed with wordwrapping and submitted without carriage returns and line feeds.
hardText is displayed with wordwrapping and submitted with soft returns and line feeds.
offWordwrapping is disabled. The lines appear exactly as the user types them.

The property is read/write. The property has a default value of soft.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.

remarks

to detect the difference between soft and hard you must submit the content within the textarea to an http server.

DHTML代码范例

This example dynamically sets the wrap property of a textArea to the value selected by the user.

<SCRIPT>
function ChangeWrap(oSelect, oTA)
{
cValue = oSelect.options(oSelect.selectedIndex).value;
oTA.wrap = cValue;
}
</SCRIPT>
...
<SELECT ID=cboWrap onchange="ChangeWrap(this, txt1)">
<OPTION VALUE=soft>soft
<OPTION VALUE=hard>hard
<OPTION VALUE=off>off
</SELECT>
<P>
<TEXTAREA ID=txt1 STYLE="height:200;width:200"></TEXTAREA>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

是否符合公共标准

There is no public standard that applies to this property.

Applies To

TEXTAREA, PRE