c#解码js中的eval
private string Eval(string stringjs)
{
string MyJs = "function Eval(code){code2=code.replace(/^eval/,'');return eval(code2);}";
object[] _params = new object[1];
_params[0] = stringjs;
MSScriptControl.ScriptControl js = new MSScriptControl.ScriptControl();
js.Language = "javascript";
js.AddCode(MyJs);
string result = js.Run("Eval", _params);//NET4.0以下为js.Run("Eval",ref _params).ToString();
return result;
}