可能是这样:
var
Doc: IHTMLDocument2;
being
Doc := Document2 as IHTMLDocument2;
for i := 0 to doc.all.length - 1 do
begin
Element:=doc.all.item(EmptyParam, i) as IHTMLElement;
if WideSameText(Element.tagName, 'TD') then
begin
end;
end;
end;
var
Doc: IHTMLDocument2;
being
Doc := Document2 as IHTMLDocument2;
for i := 0 to doc.all.length - 1 do
begin
Element:=doc.all.item(EmptyParam, i) as IHTMLElement;
if WideSameText(Element.tagName, 'TD') then
begin
end;
end;
end;
解决方案 »
- TButton类型数组怎样定义及初始化
- 各位高手全局变量一般都是怎么命名的?
- 导出Excel的问题 CXlsBof: array[0..5] of Word = ($809, 8, 0, $10, 0, 0);
- 急,如何让combobox1控件完成类似于自动索引的功能?
- 那里有delphi完整版的下载
- 一个数据库转换的问题!
- spcomm在哪裡
- DELPHI疑难7问
- 在EDIT控件里怎样才能做到只能输入日期格式的字符串?
- 大家帮我看看 这样的报表如何实现
- 一个原本用XE3写的代码,升级到XE7后,无法设Debug断点,怎么办?
- 如何遍历webbrowser控件document文档里面的表格单元格对象?
procedure TForm1.btn2Click(Sender: TObject);
var
i:Integer;
myole:oleVariant;
begin
myole := wb1.Document;
for i := 0 to myole.all.length - 1 do
begin
//if (myole.all.item(i).tagName = 'INPUT') then
if (myole.all.item(i).tagName = 'INPUT') and (i=28) then
begin
ShowMessage( myole.all.item(i).value);
//ShowMessage(IntToStr(i));
// ShowMessage( myole.all.item(i).name);
//mmo1.Lines.Add(myole.all.item(i).name); //mmo1.Lines.Add(myole.all.item(i).value);
end;
end;end;
EWB.DocumentSourceText获取网页源码:
EWB.DocumentSource
table