var Form : IHTMLFormElement ; D:IHTMLDocument2 ; begin with WebBrowser1 do begin D := Document as IHTMLDocument2; Form := D.Forms.item( 'form1 ',0) as IHTMLFormElement; //form1为表单名 //title为表单中的文本框 (form.item( 'title ',0) as IHTMLElement).setAttribute…
步骤一:获取网页中验证码图片的url地址 在delphi中加入一个BitBtn和一个memo以及WebBrowser控件实现网页中验证码图片的url地址的获取 程序如下:procedure TForm1.BitBtn1Click(Sender: TObject); var I:Integer; begin for I:=0 to WebBrowser1.OleObject.document.images.length-1 do Memo1.Lines.Add(WebBrowser…
var Form : IHTMLFormElement ; D:IHTMLDocument2 ; begin with WebBrowser1 do begin D := Document as IHTMLDocument2; Form := D.Forms.item( 'form1 ',0) as IHTMLFormElement; //form1为表单名 //title为表单中的文本框 (form.item( 'title ',0) as IHTMLElement).setAttribute…
通篇引用mshtml; 一.webbrowser获取滚动条的位置 function GetScrollPositionX(FWB:TEmbeddedWB):Integer; //水平滚动条位置 begin result := FWB.OleObject.document.getElementsByTagName('HTML').item(0).ScrollLeft; end; function GetScrollPositionY(FWB:TEmbeddedWB):Integer;…
var Form : IHTMLFormElement ; D:IHTMLDocument2 ; begin with WebBrowser1 do begin D := Document as IHTMLDocument2; Form := D.Forms.item( ) as IHTMLFormElement; //form1为表单名 //title为表单中的文本框 (form.item( ) ); (form.item( ) ); (form.item( ) as IHTMLElement…
procedure TregedtIE.FormCreate(Sender: TObject); begin WriteAppNameToReg; WebBrowser1.Navigate('C:\a.html'); end; {--} {需要注意是GetNativeSystemInfo 函数从Windows XP 开始才有, 而 IsWow64Process 函数从 Windows XP with SP2 以及 Windows Server 2003 wit…