Parse JavaScript code in C#

前端 未结 4 1838
旧巷少年郎
旧巷少年郎 2021-01-18 02:00

I have the following JavaScript code as a string literal:

var $Page = new function()
{
    var _url= \'http://www.some.url.com\';

    this.Download = functi         


        
4条回答
  •  悲哀的现实
    2021-01-18 02:49

    There is an open-source JavaScript interpreter in C# at http://jint.codeplex.com, if you need more than just getting the value.

    This is now moved to GITHUB

提交回复
热议问题