是否有可能执行JavaScript code在.NET Framework?

是否有可能执行JavaScript code在.NET Framework?

问题描述:

我希望能够在其上运行的.NET环境中的服务器端执行JavaScript。
所以怎么可能这样做? 主要是我需要的文字处理功能,我会输入一个字符串,并得到从JavaScript code返回的字符串。
不需要任何窗口交互。

i want to be able to execute JavaScript on the server side which is running the .net environment.
so how is it possible to do so? mainly i need text processing functions, i will input a string and get a string returned from JavaScript code.
no window interaction is needed.

是的,有一些JS引擎,您可以使用。 侏罗纪 Jint IronJS 是基于.NET的,但你也可以连接到其他如从Chrome浏览器的V8或有关ActiveScript从IE浏览器。

Yes, there are several JS engines which you can use. Jurassic, Jint and IronJS are .NET-based, but you can also interface to others such as the V8 from the Chrome browser or the ActiveScript from IE.