procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject;
const pDisp: IDispatch; var URL: OleVariant);
var
iDoc: IHtmlDocument2;
i, j: integer;
iDisp: IDispatch;
iColl: IHTMLElementCollection;
iSel: IHTMLSelectElement;
iOpt: IHTMLOptionElement;
hr: HRESULT;
begin
oper.clear;
hr:= WebBrowser1.ControlInterface.Document.QueryInterface(IHtmlDocument2,
iDoc);
if Failed(hr) then
Exit;
iDisp:= iDoc.all.tags('SELECT');
if not assigned(iDisp) then
Exit;
hr:= iDisp.QueryInterface(IHTMLElementCollection, iColl);
if Failed(hr) then
Exit;
for i:= 1 to iColl.length do
begin
iDisp:= iColl.item(Pred(i), Pred(i));
hr:= iDisp.QueryInterface(IHTMLSelectElement, iSel);
if (not Failed(hr)) and (iSel.name = 'home') then
begin
for j:= 1 to iSel.length do
begin
iDisp:= iSel.item(Pred(j), Pred(j));
hr:= iDisp.QueryInterface(IHTMLOptionElement, iOpt);
if not Failed(hr) then
oper.Items.Add(iOpt.value);
end;
Break;
end;
end;
end;
oper.Items.Clear;
Если Вы уже зарегистрированы на Портале - войдите в систему, если Вы еще не регистрировались - пройдите простую процедуру регистрации.