ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: JavaScript :: JSʼþ²Î¿¼

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

JavaScript
JSÊýѧ¶ÔÏó²Î¿¼
JS×Ö·û´®¶ÔÏó²Î¿¼
JSº¯Êý²Î¿¼
JSʼþ²Î¿¼
Javascript ³£ÓÃÕ..
FFºÍIEϵÄjs¼æÈÝ..
jQuery ¼òµ¥½éÉÜ
jQuery / ºËÐÄ / ..
jQuery / ºËÐÄ / ..
ÈçºÎʹÓÃJSÀ´ÅжÏ..
JavascriptÔÚIEºÍ..
3¸öjs×Ö·û±àÂ뺯Ê..
javascript ÖÐµÄ ..

JSʼþ²Î¿¼


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:14529 :: ::

Events are normally used in combination with functions, and the function will not be executed before the event occurs!
ʼþÒ»°ãºÍº¯ÊýÊÇ»ìºÏʹÓõģ¬ÔÚʼþ·¢ÉúÒÔǰһ°ãº¯ÊýÊDz»»áÖ´Ðеģ¡


Event Handlers
ʼþµÄ´¦Àí

New to HTML 4.0 was the ability to let HTML events trigger actions in the browser, like starting a JavaScript when a user clicks on an HTML element. Below is a list of the attributes that can be inserted into HTML tags to define event actions.
HTML4.0µÄÐÂÊôÐÔ¾ÍÊÇ¿ÉÒÔÔÚä¯ÀÀÆ÷Öм¤·¢HTMLʼþ¡£µ±Óû§µã»÷Ò»¸öÒ»¸öHTMLÔªËØÊ±£¬¿ÉÒÔ¼¤·¢JS¡£ÏÂÃæµÄÁбíÁоÙÁË¿ÉÒÔ²åÈëHTML±êÇ©ÖÐÀ´¶¨Òåʼþ¶¯×÷µÄÊôÐÔ¡£

FF: Firefox, N: Netscape, IE: Internet Explorer
FF:»ðºü£¬N:Íø¾°£¬IE

Attribute
ÊôÐÔ
The event occurs when...
ʼþ·¢Éúʱ»ú
FF N IE
onabort Loading of an image is interrupted
ͼƬÏÂÔØ±»´ò¶Ïʱ
1 3 4
onblur An element loses focus
ÔªËØÊ§È¥½¹µãʱ
1 2 3
onchange The content of a field changes
¿òÄÚÈݸıäʱ
1 2 3
onclick Mouse clicks an object
Êó±êµã»÷Ò»¸ö¶ÔÏóʱ
1 2 3
ondblclick Mouse double-clicks an object
Êó±êË«»÷Ò»¸ö¶ÔÏóʱ
1 4 4
onerror An error occurs when loading a document or an image
µ±¼ÓÔØÎĵµ»òͼƬʱ·¢Éú´íÎóʱ
1 3 4
onfocus An element gets focus
µ±ÔªËØ»ñÈ¡½¹µãʱ
1 2 3
onkeydown A keyboard key is pressed
°´Ï¼üÅ̰´¼üʱ
1 4 3
onkeypress A keyboard key is pressed or held down
°´Ï»ò°´×¡¼üÅ̰´¼üʱ
1 4 3
onkeyup A keyboard key is released
·Å¿ª¼üÅ̰´¼üʱ
1 4 3
onload A page or an image is finished loading
Ò³Ãæ»òͼƬ¼ÓÔØÍê³Éʱ
1 2 3
onmousedown A mouse button is pressed
Êó±ê±»°´ÏÂʱ
1 4 4
onmousemove The mouse is moved
Êó±ê±»Òƶ¯Ê±
1 6 3
onmouseout The mouse is moved off an element
Êó±êÀë¿ªÔªËØÊ±
1 4 4
onmouseover The mouse is moved over an element
Êó±ê¾­¹ýÔªËØÊ±
1 2 3
onmouseup A mouse button is released
ÊÍ·ÅÊó±ê°´¼üʱ
1 4 4
onreset The reset button is clicked
ÖØÐµã»÷Êó±ê°´¼üʱ
1 3 4
onresize A window or frame is resized
µ±´°¿Ú»ò¿ò¼Ü±»ÖØÐ¶¨Òå³ß´çʱ
1 4 4
onselect Text is selected
Îı¾±»Ñ¡Ôñʱ
1 2 3
onsubmit The submit button is clicked
µã»÷Ìá½»°´Å¥Ê±
1 2 3
onunload The user exits the page
Óû§Àë¿ªÒ³ÃæÊ±
1 2 3

ÆÀÂÛ (0) All