Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/443.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何单击JavaScript按钮WebBrowser Delphi_Javascript_Delphi_Button_Click_Twebbrowser - Fatal编程技术网

如何单击JavaScript按钮WebBrowser Delphi

如何单击JavaScript按钮WebBrowser Delphi,javascript,delphi,button,click,twebbrowser,Javascript,Delphi,Button,Click,Twebbrowser,如何使用delphi单击此按钮?严格来说,这不是一个按钮。它只是可点击超链接中的一个图像 在任何情况下,HTML元素都没有指定和name或id,因此您的工作已经完成。您必须首先查询WebBrowser.Document中的IHTMLDocument2接口,然后根据需要挖掘浏览器的DOM接口,查找您感兴趣的元素,然后可以调用其click()方法。这不是一个按钮,严格意义上说。它只是可点击超链接中的一个图像 在任何情况下,HTML元素都没有指定和name或id,因此您的工作已经完成。您必须首先查询W

如何使用delphi单击此按钮?

严格来说,这不是一个按钮。它只是可点击超链接中的一个图像


在任何情况下,HTML元素都没有指定和
name
id
,因此您的工作已经完成。您必须首先查询
WebBrowser.Document
中的
IHTMLDocument2
接口,然后根据需要挖掘浏览器的DOM接口,查找您感兴趣的
元素,然后可以调用其
click()
方法。

这不是一个按钮,严格意义上说。它只是可点击超链接中的一个图像

在任何情况下,HTML元素都没有指定和
name
id
,因此您的工作已经完成。您必须首先查询
WebBrowser.Document
中的
IHTMLDocument2
接口,然后根据需要挖掘浏览器的DOM接口,查找您感兴趣的
元素,然后您可以调用其
click()
方法。

谢谢兄弟,我正在使用

作用

procedure ExecuteScript(doc: IHTMLDocument2; script: string; language: string);
begin
  if doc <> nil then
  begin
    if doc.parentWindow <> nil then
      doc.parentWindow.ExecScript(script, Olevariant(language)) ;
  end;
end;
谢谢兄弟,我在用

作用

procedure ExecuteScript(doc: IHTMLDocument2; script: string; language: string);
begin
  if doc <> nil then
  begin
    if doc.parentWindow <> nil then
      doc.parentWindow.ExecScript(script, Olevariant(language)) ;
  end;
end;