连接到这个接口当提交时就会发个消息通知你
HTMLFormElementEvents = dispinterface
['{3050F364-98B5-11CF-BB82-00AA00BDCE0B}']
function onhelp: WordBool; dispid -2147418102;
function onclick: WordBool; dispid -600;
function ondblclick: WordBool; dispid -601;
function onkeypress: WordBool; dispid -603;
procedure onkeydown; dispid -602;
procedure onkeyup; dispid -604;
procedure onmouseout; dispid -2147418103;
procedure onmouseover; dispid -2147418104;
procedure onmousemove; dispid -606;
procedure onmousedown; dispid -605;
procedure onmouseup; dispid -607;
function onselectstart: WordBool; dispid -2147418100;
procedure onfilterchange; dispid -2147418095;
function ondragstart: WordBool; dispid -2147418101;
function onbeforeupdate: WordBool; dispid -2147418108;
procedure onafterupdate; dispid -2147418107;
function onerrorupdate: WordBool; dispid -2147418099;
function onrowexit: WordBool; dispid -2147418106;
procedure onrowenter; dispid -2147418105;
procedure ondatasetchanged; dispid -2147418098;
procedure ondataavailable; dispid -2147418097;
procedure ondatasetcomplete; dispid -2147418096;
procedure onlosecapture; dispid -2147418094;
procedure onpropertychange; dispid -2147418093;
procedure onscroll; dispid 1014;
procedure onfocus; dispid -2147418111;
procedure onblur; dispid -2147418112;
procedure onresize; dispid 1016;
function ondrag: WordBool; dispid -2147418092;
procedure ondragend; dispid -2147418091;
function ondragenter: WordBool; dispid -2147418090;
function ondragover: WordBool; dispid -2147418089;
procedure ondragleave; dispid -2147418088;
function ondrop: WordBool; dispid -2147418087;
function onbeforecut: WordBool; dispid -2147418083;
function oncut: WordBool; dispid -2147418086;
function onbeforecopy: WordBool; dispid -2147418082;
function oncopy: WordBool; dispid -2147418085;
function onbeforepaste: WordBool; dispid -2147418081;
function onpaste: WordBool; dispid -2147418084;
function oncontextmenu: WordBool; dispid 1023;
procedure onrowsdelete; dispid -2147418080;
procedure onrowsinserted; dispid -2147418079;
procedure oncellchange; dispid -2147418078;
procedure onreadystatechange; dispid -609;
procedure onbeforeeditfocus; dispid 1027;
function onsubmit: WordBool; dispid 1007;
function onreset: WordBool; dispid 1015;
end;
对于ONSUBMIT事件,MSDN是这么说的
HTMLFormElementEvents:
nsubmit Event
--------------------------------------------------------------------------------
Fires when a FORM is about to be submitted.
Syntax
VARIANT_BOOL onsubmit( VOID);
Return Value
If the event bubbles and is cancellable, return VARIANT_TRUE to prevent the event from bubbling to other event handlers in the document tree. Return VARIANT_FALSE to allow bubbling.
Event DISPID
DISPID_HTMLFORMELEMENTEVENTS_ONSUBMIT
The DISPID for this event is defined in mshtmdid.h. Use this value to identify the event handler when implementing IDispatch::Invoke.
Event Information
Bubbles No
Cancels Yes
To invoke Submit a form using the INPUT TYPE=submit, INPUT TYPE=image, or BUTTON TYPE=submit object.
Default action Causes a form to be sent to whatever location is stipulated in the ACTION attribute of the form object.
Event Object Properties
When the onsubmit event is fired, you can query for any of the following properties on the IHTMLEventObj, IHTMLEventObj2, or IHTMLEventObj3 interfaces. Use the IHTMLWindow2::event property on the IHTMLWindow2 interface to retrieve the IHTMLEventObj interface for the current event. Alternatively, for the HTMLXxxEvents2 interfaces, you can use the pEvtObj parameter to access the current event object. To obtain an IHTMLEventObj2 or IHTMLEventObj3 interface pointer, call QueryInterface on the IHTMLEventObj interface.
Hide Available Properties
IHTMLEventObj::altKey Retrieves a value that indicates the state of the ALT key.
IHTMLEventObj2::altKey Sets or retrieves a value that indicates the state of the ALT key.
IHTMLEventObj3::altLeft Sets or retrieves a value that indicates the state of the left ALT key.
IHTMLEventObj::ctrlKey Retrieves the state of the CTRL key.
IHTMLEventObj2::ctrlKey Sets or retrieves the state of the CTRL key.
IHTMLEventObj3::ctrlLeft Sets or retrieves the state of the left CTRL key.
IHTMLEventObj::returnValue Sets or retrieves the return value from the event.
IHTMLEventObj::shiftKey Retrieves the state of the SHIFT key.
IHTMLEventObj2::shiftKey Sets or retrieves the state of the SHIFT key.
IHTMLEventObj3::shiftLeft Retrieves the state of the left SHIFT key.
IHTMLEventObj::srcElement Retrieves the object that fired the event.
IHTMLEventObj2::srcElement Sets or retrieves the object that fired the event.
IHTMLEventObj::type Sets or retrieves the event name from the event object.
IHTMLEventObj2::type Sets or retrieves the event name from the event object.
Remarks
You can override this event by returning false in the event handler. Use this capability to validate data on the client side to prevent invalid data from being submitted to the server. If the event handler is called by the HTMLFormElementEvents:
nsubmit attribute of the form object, the code must explicitly request the return value using the return function, and the event handler must provide an explicit return value for each possible code path in the event handler function.
The IHTMLFormElement::submit method does not invoke the HTMLFormElementEvents:
nsubmit event handler.
See Also
ACTION, METHOD