Language References
Functions as a multiline HTML control with both a run mode and design mode.
HTML Syntax
<htmlarea
accesskey = key
class = classname
cols = n
datafld = colname
datasrc = #id
disabled
id = value
name = name
readonly
rows = n
style = css properties
tabindex = n
title = text
wrap = off | hard | soft
event = script
>
The HTMLAREA element is analogous to the TEXTAREA, with the addition of the capability to display HTML. The HTMLAREA object defaults to design mode. In design mode, the user can resize objects, edit text, and fire events. Set the readOnly property to false to switch into run mode. In run mode, the object is a container and behaves much like the DIV object. Events bubble up to container level and objects within the HTMLAREA object inherit CSS styles from it.
The HTMLAREA can contain all HTML elements.
When submitted on a form, HTMLAREA passes on any HTML source code it contains.
As with any container, the upper-left corner of the HTMLAREA object is the 0,0 point of orientation for absolutely positioned elements contained within.
HTMLAREA Members
The example demonstrates how to use the HTMLAREA object as an editor.
Sample Code
<head>
<script language="JavaScript">
/* setExpression dynamically updates
the htmlarea and division objects. */
result1.setExpression ( "innerHTML","oInput.value","" );
result2.setExpression ( "innerHTML","oInput.value","" );
</script>
</head>
<body>
<h1>Using the htmlarea object as an editor</h1>
<p>This example illustrates the ability of the
htmlarea object to contain and render HTML.
<p>Enter HTML source here
<TEXTAREA id=oInput WRAP=physical></TEXTAREA>
<p>See the HTML displayed in this htmlarea
<htmlAREA id=result1 STYLE="width:100%;height=100px"
WRAP="hard"></HTMLAREA>
<p>And in this division
<div id=result2></DIV>
</body>
Show me
All HTML elements.