且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

脚本编辑器控件在ASP.Net中

更新时间: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 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