首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

delphi向页面安插值

2013-01-06 
delphi向页面插入值。图片事例在http://q.cnblogs.com/q/32716/delphi代码如下:procedure TfrmPrice.SetPag

delphi向页面插入值。
图片事例在http://q.cnblogs.com/q/32716/
delphi代码如下:


procedure TfrmPrice.SetPage;
var
  o,v: OleVariant;
  frm: IHTMLDocument2;
  iw: IWebbrowser2;
  i,j,k: Integer;
  iValue: integer;
  sInfo,sValue: string;
  strs : TStrings;
begin      
          sInfo  := glExcel[giInfoID][strtoint(glModule[i].sCol)];
          strs := TStringList.Create;
          strs.Delimiter := '\';
          strs.DelimitedText := sInfo;
          for j := 0 to strs.Count - 1 do    // Iterate
          begin
            if j = 0 then
            begin
              sValue := GetAreaName(strs[j]);
              o := frm.all.item(glModule[i].sId + inttostr(j),0);
              o.value := sValue;
            end
            else
            begin
              o := frm.all.item('addSmsRegion',0);
              o.Click;
              sValue := GetAreaName(strs[j]);
              o := frm.all.item(glModule[i].sId + inttostr(j),0);
              o.value := sValue;//执行到这里出错。
            end;
          end;
        end

第二次插入值的时候就不对了。
求解。
[解决办法]
[email=251450368@qq.com][/email]

热点排行