Home > Back-end >  DELPHI call js does not support this property or method
DELPHI call js does not support this property or method

Time:10-18

The function ExecScript (Code, Lang, Func: string) : string;
Var
Script: OleVariant;
The begin
Script:=CreateOleObject (' ScriptControl);
Script. Language:=Lang;
Script. AddCode (Code);
Result:=script. Eval (Func);
end;
Procedure TForm1. Button1Click (Sender: TObject);
Var
Js: OleVariant;
STR: string;
The begin
Memo2. Lines. Text:=ExecScript (Memo1. Text, 'JavaScript' and 'signs () ");
//ShowMessage (STR);

end;

CodePudding user response:

This does not Delphi support, Delphi also just called Ole, you give the wrong should be Ole,
Need to check your JS code and corresponding use of like,
  • Related