WRAP Attribute | wrap Property
Sets or retrieves how to handle wordwrapping in the object.
Syntax
HTML <TEXTAREA WRAP = sWrap ... > Scripting object.wrap [ = sWrap ]
Possible Values
sWrap String that specifies one of the following values:
soft 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 with 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 dynamic properties.
Remarks
To detect the difference between soft and hard you must submit the content within the TEXTAREA to an HTTP server.
Example
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>
Applies To
[ Object Name ] Platform Version Win16: Win32: Mac: Unix: WinCE: Version data is listed when the mouse hovers over a link, or the link has focus. TEXTAREA
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.