抓取网页数据问题(50分)

  • 主题发起人 foreachman
  • 开始时间
F

foreachman

Unregistered / Unconfirmed
GUEST, unregistred user!
请问为什么下面得到的网页输入原素(ihtmlinputelement)都是nil呢
var
do
c:IHTMLDocument2;
form:ihtmlformelement;
Custidelement,userinputelement,pwdinputelement:ihtmlinputelement;
Btninput : OleVariant;
begin
try
do
c:= wb1.document as IHTMLDocument2;
Custidelement:=(doc.all.item('CUSTOMERID',0) as ihtmlinputelement);
if Custidelement<> nil then
// 为什么老是nil ?
Custidelement.value:='aaa';
userinputelement:=(doc.all.item('USERID',0) as ihtmlinputelement);
if userinputelement<> nil then
// 为什么老是nil ?
userinputelement.value:='000001';
pwdinputelement:=(doc.all.item('LOG_PWD',0) as ihtmlinputelement);
if pwdinputelement<> nil then
// 为什么老是nil ?
pwdinputelement.value:='bbb';
Btninput:=doc.all.item('log_buttom',0);
Btninput.click ;
except
end;
end;
 
自己顶,再顶
 
懒的看了,你查下这个贴吧
http://www.delphibbs.com/delphibbs/dispq.asp?lid=3859799
 
to 暗夜中独舞 :
ObjectFromLresult: TObjectFromLresult;
这个声明的对像是什么那里来的,我这里显示这句出错的!还有准能解释下我上面的代码的问题要怎么解决!
谢谢!
 
type
TObjectFromLResult = function(LRESULT: lResult;
const IID: TIID;
WPARAM: wParam;
out pObject): HRESULT;
stdcall;
 
const IID: TIID;是从哪来的
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
顶部