申明什么变量可以给网页doc.frames的每桢赋值?如果一个网页doc,其中包括多个桢doc.frames,我想创建doc.frames个桢的doc子桢的实例,并赋值给它,这样做为什么不行呢?谢谢。var
  i:integer;
  j:olevariant;
  doc,doc[i]:ihtmldocument2;//我想根据doc.frames的数量创建多个实例doc[i];
  frameele:ihtmlframescollection2;
  oneframe:Ihtmlwindow2;
  spdisp:idispatch;
begin
  doc:=webbrowser1.document as ihtmldocument2;
  frameele:=doc.frames;
  for i:= 0 to frameele.length-1 do begin
    j:=i;
    spDisp:=Frameele.item(j);
    if SUCCEEDED(spDisp.QueryInterface(IHTMLWindow2 ,oneframe))then
    doc[i]:=oneframe.document;//这样直接赋值可以吗?
  end;
end;