要知道网页中的按钮的名称等
procedure TfrmIssue.SendBiddingInf;
var
HtmlDoc : IHTMLDocument2;
HtmlForms : IHTMLFormElement;
i: Integer;
InputText: IHTMLInputTextElement;
TypeElement: variant;
strFlag : string;
IsSucc : boolean;
begin
{发送数据}
//当前网页页面文档对象(wbIssue是TWebBrower)
HtmlDoc := wbIssue.document as IHTMLDocument2;
//
for i := 0 to HtmlDoc.all.length - 1 do
begin
TypeElement := HtmlDoc.all.item(i, varempty);
//判断数据是否已经填写
if (Uppercase(TypeElement.tagName) = 'INPUT') and (Uppercase(TypeElement.type) = 'TEXT') then
begin
InputText := HtmlDoc.all.item(i, varempty) as IHTMLInputTextElement;
if (InputText.name = 'BulletinID') and (InputText.value = '') then
begin
//数据不完整,提示先填写完整再发送
MessageDlg(sNull,mtInformation,[mbOk],0);
Exit;
end;//end of if .. and .. (公告号)
end;//end of Input(Text)
end;//end of for
//发送
HtmlForms := HtmlDoc.forms.item(0, varempty) as IHTMLFormElement;
HtmlForms.submit;
end;