如何在 TWebBrowser 中判断用户在网页中点击的 Radio 按钮,并截获它的 onclick 事件?(300分求解)(300分)

B

bundur

Unregistered / Unconfirmed
GUEST, unregistred user!
如何 在TWebBrowser 中判断用户在网页中点击的是哪个 Radio 按钮,
并截获它的 onclick 事件?

网页例子参照
http://people.etang.com/nf/cm_poll.asp
右边的照片选单.
 
dreamweaver中好象有这种事件,你查查它,
 
看看这两个接口,答案应该在里面,放假了,不想研究,你自己看看。
IHTMLInputButtonElement = interface(IDispatch)
['{3050F2B2-98B5-11CF-BB82-00AA00BDCE0B}']
function Get_type_: WideString
safecall;
procedure Set_value(const p: WideString)
safecall;
function Get_value: WideString
safecall;
procedure Set_name(const p: WideString)
safecall;
function Get_name: WideString
safecall;
procedure Set_status(p: OleVariant)
safecall;
function Get_status: OleVariant
safecall;
procedure Set_disabled(p: WordBool)
safecall;
function Get_disabled: WordBool
safecall;
function Get_form: IHTMLFormElement
safecall;
function createTextRange: IHTMLTxtRange
safecall;
property type_: WideString read Get_type_;
property value: WideString read Get_value write Set_value;
property name: WideString read Get_name write Set_name;
property status: OleVariant read Get_status write Set_status;
property disabled: WordBool read Get_disabled write Set_disabled;
property form: IHTMLFormElement read Get_form;
end;

IHTMLInputElement = interface(IDispatch)
['{3050F5D2-98B5-11CF-BB82-00AA00BDCE0B}']
procedure Set_type_(const p: WideString)
safecall;
function Get_type_: WideString
safecall;
procedure Set_value(const p: WideString)
safecall;
function Get_value: WideString
safecall;
procedure Set_name(const p: WideString)
safecall;
function Get_name: WideString
safecall;
procedure Set_status(p: WordBool)
safecall;
function Get_status: WordBool
safecall;
procedure Set_disabled(p: WordBool)
safecall;
function Get_disabled: WordBool
safecall;
function Get_form: IHTMLFormElement
safecall;
procedure Set_size(p: Integer)
safecall;
function Get_size: Integer
safecall;
procedure Set_maxLength(p: Integer)
safecall;
function Get_maxLength: Integer
safecall;
procedure select
safecall;
procedure Set_onchange(p: OleVariant)
safecall;
function Get_onchange: OleVariant
safecall;
procedure Set_onselect(p: OleVariant)
safecall;
function Get_onselect: OleVariant
safecall;
procedure Set_defaultValue(const p: WideString)
safecall;
function Get_defaultValue: WideString
safecall;
procedure Set_readOnly(p: WordBool)
safecall;
function Get_readOnly: WordBool
safecall;
function createTextRange: IHTMLTxtRange
safecall;
procedure Set_indeterminate(p: WordBool)
safecall;
function Get_indeterminate: WordBool
safecall;
procedure Set_defaultChecked(p: WordBool)
safecall;
function Get_defaultChecked: WordBool
safecall;
procedure Set_checked(p: WordBool)
safecall;
function Get_checked: WordBool
safecall;
procedure Set_border(p: OleVariant)
safecall;
function Get_border: OleVariant
safecall;
procedure Set_vspace(p: Integer)
safecall;
function Get_vspace: Integer
safecall;
procedure Set_hspace(p: Integer)
safecall;
function Get_hspace: Integer
safecall;
procedure Set_alt(const p: WideString)
safecall;
function Get_alt: WideString
safecall;
procedure Set_src(const p: WideString)
safecall;
function Get_src: WideString
safecall;
procedure Set_lowsrc(const p: WideString)
safecall;
function Get_lowsrc: WideString
safecall;
procedure Set_vrml(const p: WideString)
safecall;
function Get_vrml: WideString
safecall;
procedure Set_dynsrc(const p: WideString)
safecall;
function Get_dynsrc: WideString
safecall;
function Get_readyState: WideString
safecall;
function Get_complete: WordBool
safecall;
procedure Set_loop(p: OleVariant)
safecall;
function Get_loop: OleVariant
safecall;
procedure Set_align(const p: WideString)
safecall;
function Get_align: WideString
safecall;
procedure Set_onload(p: OleVariant)
safecall;
function Get_onload: OleVariant
safecall;
procedure Set_onerror(p: OleVariant)
safecall;
function Get_onerror: OleVariant
safecall;
procedure Set_onabort(p: OleVariant)
safecall;
function Get_onabort: OleVariant
safecall;
procedure Set_width(p: Integer)
safecall;
function Get_width: Integer
safecall;
procedure Set_height(p: Integer)
safecall;
function Get_height: Integer
safecall;
procedure Set_Start(const p: WideString)
safecall;
function Get_Start: WideString
safecall;
property type_: WideString read Get_type_ write Set_type_;
property value: WideString read Get_value write Set_value;
property name: WideString read Get_name write Set_name;
property status: WordBool read Get_status write Set_status;
property disabled: WordBool read Get_disabled write Set_disabled;
property form: IHTMLFormElement read Get_form;
property size: Integer read Get_size write Set_size;
property maxLength: Integer read Get_maxLength write Set_maxLength;
property onchange: OleVariant read Get_onchange write Set_onchange;
property onselect: OleVariant read Get_onselect write Set_onselect;
property defaultValue: WideString read Get_defaultValue write Set_defaultValue;
property readOnly: WordBool read Get_readOnly write Set_readOnly;
property indeterminate: WordBool read Get_indeterminate write Set_indeterminate;
property defaultChecked: WordBool read Get_defaultChecked write Set_defaultChecked;
property checked: WordBool read Get_checked write Set_checked;
property border: OleVariant read Get_border write Set_border;
property vspace: Integer read Get_vspace write Set_vspace;
property hspace: Integer read Get_hspace write Set_hspace;
property alt: WideString read Get_alt write Set_alt;
property src: WideString read Get_src write Set_src;
property lowsrc: WideString read Get_lowsrc write Set_lowsrc;
property vrml: WideString read Get_vrml write Set_vrml;
property dynsrc: WideString read Get_dynsrc write Set_dynsrc;
property readyState: WideString read Get_readyState;
property complete: WordBool read Get_complete;
property loop: OleVariant read Get_loop write Set_loop;
property align: WideString read Get_align write Set_align;
property onload: OleVariant read Get_onload write Set_onload;
property onerror: OleVariant read Get_onerror write Set_onerror;
property onabort: OleVariant read Get_onabort write Set_onabort;
property width: Integer read Get_width write Set_width;
property height: Integer read Get_height write Set_height;
property Start: WideString read Get_Start write Set_Start;
end;
 
关注!
顺便问一个高手:
如何得到webbrowser中点击的链接?
 
我的问题已经解决了
procedure TForm1.WebBrowser2BeforeNavigate2(Sender: TObject;
const pDisp: IDispatch
var URL, Flags, TargetFrameName, PostData,
Headers: OleVariant
var Cancel: WordBool);
var U:string;
P:integer;
begin
P:=pos('/*',URL);//判断链接,你可以自己处理
if p>0 then
begin
U:=URL;
Delete(U,1,P+1);
comboBox1.Text:=U;
CanCel:=true;
end;
end;
 
没有可满意答案,不过时间过久了,发分啦~~,入者有分,分多多~~嘻~~
 
没有可满意答案,不过时间过久了,发分啦~~,入者有分,分多多~~嘻~~
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
2K
DelphiTeacher的专栏
D
I
回复
0
查看
554
import
I
D
回复
0
查看
2K
DelphiTeacher的专栏
D
顶部