更新时间:2023-02-03 15:44:44
这种控制只是元素< textarea。 .. />
。
要制作脚本编辑器,您需要一个单独的脚本来获取属性的值value
此元素(它是一个表示文本区域中键入的文本的字符串),只需调用JavaScript函数eval
,传递这个值作为参数。得到函数的结果,present是其他元素。
这是一个完整的例子:http://sakryukov.org/freeware/calculator/ [ ^ ]。
您可以添加许多其他细节和功能......
享受,-SA
Such control is simply the element<textarea ... />
.
To make is a script editor, you need a separate script which gets the value of the propertyvalue
of this element (it is a string representing the text typed in the text area) and simply call JavaScript functioneval
, 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