wrap

Jump to: navigation, search

wrap

This article is Ready to Use.

W3C Working Draft

Summary

Sets the wrap style (soft, hard, or off) for a text element.


Applies to dom/HTMLElement

Examples

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

JavaScript

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

View live example

Notes

Remarks

To detect the difference between soft and hard you must submit the content within the textArea to an HTTP server.


Related specifications

Specification Status Related Changes
CSS Text Module Level 3 W3C Working Draft

See also

Related pages (MSDN)

  • textArea

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]