Sets or retrieves how to handle wordwrapping in the object.
= sWrap... >
|Scripting||object.wrap [ = sWrap ]|
specifies or receives one of the following values.|
|soft||Default. Text is displayed with wordwrapping and submitted without carriage returns and line feeds.|
|hard||Text is displayed with wordwrapping and submitted with soft returns and line feeds.|
|off||Wordwrapping is disabled. The lines appear exactly as the user types them.|
The property is read/write.
The property has a default value of
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.
To detect the difference between soft and hard you must submit the content within the textArea to an HTTP server.
This example dynamically sets the wrap property of a textArea to the value selected by the user.
function ChangeWrap(oSelect, oTA)
cValue = oSelect.options(oSelect.selectedIndex).value;
oTA.wrap = cValue;
<SELECT ID=cboWrap onchange="ChangeWrap(this, txt1)">
<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.