骗子,骗分有意思吗?
总代码如下:
function TForm1.RunJs(const JsCode, JsVar: string): string;
var
script:OleVariant;
begin
try
Script :=CreateOleObject('ScriptControl');
Script.Language :='JavaScript';
Script.ExecuteStatement(JsCode);
Result :=Script.Eval(JsVar);
except
result :='';
e
骗子,骗分有意思吗? 总代码如下: function TForm1.RunJs(const JsCode, JsVar: string): string; var script:OleVariant; begin try Script :=CreateOleObject('ScriptControl'); Script.Language :='JavaScript'; Script.ExecuteStatement(JsCode); Result :=Script.Eval(JsVar); except result :=''; e