asp.net.ph

Skip Navigation Links

WRAP Attribute | wrap Property

Language References


Please note that this document describes a technology not included in the W3C HTML 4.0 specification, but is available in both Internet Explorer® and Netscape® Navigator® versions 4 and later.

Sets or retrieves how to handle wordwrapping in the object.

Syntax


Inline <TEXTAREA WRAP = 'soft' | 'hard' | 'off'...>
Script object.wrap = sWrap ]

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

Remarks

Detecting the difference between soft and hard requires submitting the content within the TEXTAREA to an HTTP server.

Example

The following example dynamically sets the wrap property of a TEXTAREA to one of its possible values.

<script language="JavaScript">
function chgWrap ( oSel, tArea ) {
cVal = oSel.options ( oSel.selectedIndex ).value;
tArea.wrap = cVal;
}
</script>
...
<select id=cboWrap onchange="chgWrap ( 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.

 Show me 

Applies To

HTMLAREA, TEXTAREA



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note