本文整理自网络,侵删。
// this is a Pascal methodprocedure MyPascalProc(s: string);begin ShowMessage(s);end;
procedure TForm1.WebButton1Click(Sender: TObject);begin asm // this is pure Javascript code $impl.MyPascalProc("test"); end;end;
procedure TForm.MyTest;var a: integer;begin a := 42; asm alert('this is my JavaScript call ' +a); end;end;
相关阅读 >>
Delphi windows 编程[20] - 改变菜单项并换行
Delphi firedac 下的 sqlite [11] - 关于批量提交 sql 命令的测试
Delphi recodedatetime、recodedate、recodetime、recodeyear ... 修改时间
Delphi webbrowser载入自定义html内容并显示
Delphi中通过tclientsocket获取公网(wan)ip地址
更多相关阅读请进入《Delphi》频道 >>