Such control is simply the element
<textarea ... />
.
To make is a script editor, you need a separate script which gets the value of the property
value
of this element (it is a string representing the text typed in the text area) and simply call JavaScript function
eval
, passing this value as an argument. Get a the result of the function and present is some other element.
Here is a complete example:
http://sakryukov.org/freeware/calculator/[
^].
You can add a lot of other detail and features…
Enjoy,
—SA