htmlÎı¾¿ò¿Ø¼þµÄ³£ÓÃÊôÐÔ¡¢Ê¼þºÍ·½·¨
´°¿Úʼþ (Window Events)
½öÔÚ body ºÍ frameset ÔªËØÖÐÓÐЧ¡£
ÊôÐÔ Öµ ÃèÊö
onload ½Å±¾ µ±ÎĵµÔØÈëʱִÐнű¾
onunload ½Å±¾ µ±ÎĵµÐ¶ÔØÊ±Ö´Ðнű¾
±íµ¥ÔªËØÊ¼þ (Form Element Events)
½öÔÚ±íµ¥ÔªËØÖÐÓÐЧ¡£
ÊôÐÔ Öµ ÃèÊö
onpropertychange ½Å±¾ µ±Îı¾ÄÚÈݸıäʱִÐнű¾
onchange ½Å±¾ µ±ÔªËظıäʱִÐнű¾
onsubmit ½Å±¾ µ±±íµ¥±»ÌύʱִÐнű¾
onreset ½Å±¾ µ±±íµ¥±»ÖØÖÃʱִÐнű¾
onselect ½Å±¾ µ±ÔªËر»Ñ¡È¡Ê±Ö´Ðнű¾
onblur ½Å±¾ µ±ÔªËØÊ§È¥½¹µãʱִÐнű¾
onfocus ½Å±¾ µ±ÔªËØ»ñµÃ½¹µãʱִÐнű¾
¼üÅÌʼþ (Keyboard Events)
ÔÚÏÂÁÐÔªËØÖÐÎÞЧ£ºbase, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, ÒÔ¼° title ÔªËØ¡£
ÊôÐÔ Öµ ÃèÊö
onkeydown ½Å±¾ µ±¼üÅ̱»°´ÏÂʱִÐнű¾
onkeypress ½Å±¾ µ±¼üÅ̱»°´ÏºóÓÖËÉ¿ªÊ±Ö´Ðнű¾
onkeyup ½Å±¾ µ±¼üÅ̱»ËÉ¿ªÊ±Ö´Ðнű¾
Êó±êʼþ (Keyboard Events)
ÔÚÏÂÁÐÔªËØÖÐÎÞЧ£ºbase, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, title ÔªËØ¡£
ÊôÐÔ Öµ ÃèÊö
onclick ½Å±¾ µ±Êó±ê±»µ¥»÷ʱִÐнű¾
ondblclick ½Å±¾ µ±Êó±ê±»Ë«»÷ʱִÐнű¾
onmousedown ½Å±¾ µ±Êó±ê°´Å¥±»°´ÏÂʱִÐнű¾
onmousemove ½Å±¾ µ±Êó±êÖ¸ÕëÒÆ¶¯Ê±Ö´Ðнű¾
onmouseout ½Å±¾ µ±Êó±êÖ¸ÕëÒÆ³öÄ³ÔªËØÊ±Ö´Ðнű¾
onmouseover ½Å±¾ µ±Êó±êÖ¸ÕëÐüÍ£ÓÚÄ³ÔªËØÖ®ÉÏʱִÐнű¾
onmouseup ½Å±¾ µ±Êó±ê°´Å¥±»ËÉ¿ªÊ±Ö´ÐнÅ
Ïà¹ØÎĵµ£º
¹¤×÷ºÜ¶àÄêÁË,¿ÉÊÇ»ù±¾ÉÏûÓÐÖ±½Óд¹ýHTMLÒ³Ãæ.×î¶à¾ÍÊÇά»¤Ð޸ĹýһϱðÈËдÁË.
×î½üÔÚ×öÒ»¸öÏîÄ¿µÄ»ù±¾Éè¼ÆµÄʱºò,ÒªÌá°¸¸ø¿Í»§µÄ»ÃæÑùÀý.Òò´Ë¿ªÊ¼×Ô¼ºÐ´¼ÙµÄHTML»Ãæ.ΪÁ˽Úʡʱ¼ä,ÆäËûÈ˶¼Ö»Ð´»ÃæµÄÖ÷ÒªÄÚÈݲ¿·Ö.¶ø»ÃæµÄÍ·²¿,µ×²¿ÒÔ¼°Ö÷²Ëµ¥,×Ӳ˵¥¶¼ÓÃframeÀ´ÌåÏÖ.
......
´ÓÍøÉϵÄSThtmlDialogÀý×ӸĹýÀ´µÄ£¬ÔÚMFC³ÌÐòÖÐÏÔʾHTMLÍøÒ³µÄ·½·¨
1¡¢ÔÚÊÓͼÀàÖÐÌí¼ÓÍ·Îļþ#include <Htmlctrl.h>
2¡¢ÔÚÊÓͼͷÎļþÖÐÌí¼Ó±äÁ¿
HWND m_hwndHtml;//HTML¿Ø¼þ´°¿Ú¾ä±ú
HINSTANCE m_HtmlViewInstance;//¶¯Ì¬Á´½Ó¿â×°ÔØ¾ä±ú
²¢¸³Óè³õʼֵm_HtmlViewInstance = 0;
3¡¢´´½¨ÍøÒ³¿Ø¼þ, ......
html ÍøÒ³ÃèÊöÓïÑÔ
htmlµÄ»ù±¾¿ò¼Ü
<head> //±êǩͷ
<javacript> &nb ......
¾²Ì¬½á¹¹
£¼html£¾
£¼head£¾
£¼title£¾±êÌ⣼title£¾
£¼/head£¾
£¼body£¾..........ÎļþÄÚÈÝ..........
£¼/body£¾
£¼/html£¾
1.Îļþ±êÌâ
£¼title£¾..........£¼/title£¾
2.Îļþ¸üÐÂ--£¼meta£¾
¡¡¡¾1¡¿10Ãëºó×Ô¶¯¸üÐÂÒ»´Î
¡¡¡¡£¼meta http-equiv="refresh" content=10£¾
¡¡¡¾2¡¿10Ãëáá×Ô¶¯Á¬½áµ½ÁíÒ»Îļþ
¡¡¡¡ ......
ÀÏʦÁô×÷Òµ×ö¸ö¼òµ¥Í¼Ïñä¯ÀÀ¼Ó¸÷Öַת+͸Ã÷+ºÚ°×Á¬Ðø´¦ÀíµÄhtml,±¾ÒÔΪºÜÈÝÒ×,
ËÖªµÀһ۲ŷ¢ÏÖ»ðºü¸ß°æ±¾µÄinput file ºÍIeÖеIJ»Ò»Ñù
JSÖÐfileObj.value Ö»Äܵõ½ÎļþÃû...
¸ãµÃÄÔ´üÖ±´ó
»ðºü3ÒÔÉϰ汾ÓÐbug ÒòΪinput file ²»Ö§³Ö»ñÈ¡ÎļþÍêÕû·¾¶,±È½ÏÍ´¿à,½â¾ö²»ÁË,ËùÒÔ²»ÄÜ·¢urlµ½servletÖÐ,ÒÔÖÁÓÚÖ»ÄÜä¯ÀÀ
² ......