delphi webbrowser 模拟表单提交

procedure TForm9.PINGLUN(Title,Content,YD:string);
var
    frw:IHTMLDocument2;
    TT1,TT2,TT3:IHTMLInputElement;
    LIst:IHTMLElementCollection;
    ListTexty:IHTMLOptionButtonElement;
    K:Integer;
begin
   frw:=wb1.document as IHTMLDocument2;
   TT1:=(frw.all.item('title',0) as IHTMLInputElement);
   TT1.value:=Title;
   wb1.OleObject.document.all.item('content',0).value:=Content;
   LIst:=frw.all.item('point',EmptyParam) as IHTMLElementCollection;
    for k:=0 to LIst.length-1 do
      begin
         ListTexty:=LIst.item(k,EmptyParam) as IHTMLOptionButtonElement;
           if ListTexty.value='5' then
             ListTexty.checked:=True;
        end;
   //TT2:=(frw.all.item('content',0) as IHTMLInputElement);
  // TT2.value:=HP;
   TT3:=(frw.all.item('pros',0) as IHTMLInputElement);
   TT3.value:=YD;
  // wb1.OleObject.document.getElementByID('point',1).checked;
  wb1.OleObject.document.getElementByID('saveComment').click;
  end;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值