webbrowser如何模拟点击下述按钮 |
答題得分者是:jeff377
|
tzjwj
一般會員 發表:28 回覆:30 積分:11 註冊:2005-05-09 發送簡訊給我 |
|
jeff377
初階會員 發表:9 回覆:60 積分:33 註冊:2004-08-10 發送簡訊給我 |
|
tzjwj
一般會員 發表:28 回覆:30 積分:11 註冊:2005-05-09 發送簡訊給我 |
|
jeff377
初階會員 發表:9 回覆:60 積分:33 註冊:2004-08-10 發送簡訊給我 |
|
tzjwj
一般會員 發表:28 回覆:30 積分:11 註冊:2005-05-09 發送簡訊給我 |
|
jeff377
初階會員 發表:9 回覆:60 積分:33 註冊:2004-08-10 發送簡訊給我 |
上述的getElementsByName傳回應是IHTMLElementCollection(IHTMLElement的集合) 你可以使用下列幾個函數來取的HTML中的element
getElementsByName(IHTMLElementCollection): 指定name的元素集合
getElementsByID(IHTMLElement): 指定id的元素
getElementsByTagName(IHTMLElementCollection): 指定tagName的元素集合
all(IHTMLElementCollection): 所有文件中元素集合 若你取得是IHTMLElementCollection,則以迴圈比對每個IHTMLElement特定property,來找到你要的element
|
tzjwj
一般會員 發表:28 回覆:30 積分:11 註冊:2005-05-09 發送簡訊給我 |
|
jeff377
初階會員 發表:9 回覆:60 積分:33 註冊:2004-08-10 發送簡訊給我 |
|
tzjwj
一般會員 發表:28 回覆:30 積分:11 註冊:2005-05-09 發送簡訊給我 |
|
jeff377
初階會員 發表:9 回覆:60 積分:33 註冊:2004-08-10 發送簡訊給我 |
你可以試著用這個[HTML文件解析程式],它會列出所有的HTML的Element及其類型,看能不能對你有幫助。 http://delphi.ktop.com.tw/topic.php?TOPIC_ID=74270
|
tzjwj
一般會員 發表:28 回覆:30 積分:11 註冊:2005-05-09 發送簡訊給我 |
|
jeff377
初階會員 發表:9 回覆:60 積分:33 註冊:2004-08-10 發送簡訊給我 |
var
WB: TWebBrowser
Document: HTMLDocument;
Element: IHTMLElement;
Elements: IHTMLElementCollection;
begin
Document:= WB.Document as HTMLDocument;
Elements:= Document.all as IHTMLElementCollection;
for N1:= 0 to Elements.length-1 do
begin
Element:= Elements.item(N1,0) as IHTMLElement;
//判斷指定屬性是否符合
if 判斷值=Element.屬性 then
begin
Result:= Element;
end;
end;
end;
|
tzjwj
一般會員 發表:28 回覆:30 積分:11 註冊:2005-05-09 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |