w3pop.com :: ÍøÂçѧԺ :: JavaScript :: JavaScript onmouseout ʼþ
The onmouseout event occurs when the mouse pointer moves away from a specified object.
µ±Êó±ê´ÓÌØ¶¨µÄ¶ÔÏóÉÏÒÆ¿ªÊ±´¥·¢onmouseoutʼþ
onmouseout="ËùÒªÖ´ÐеĽű¾" |
| Parameter ²ÎÊý |
Description ×¢ÊÍ |
|---|---|
| SomeJavaScriptCode ×öÒªÖ´ÐеĽű¾ |
Required. Specifies a JavaScript to be executed when the event occurs. ±ØÑ¡Ïî¡£µ±Ê¼þ´¥·¢Ê±ËùÒªÖ´ÐеĽű¾ |
Supported by the following HTML tags:
ËùÖ§³ÖµÄHTML±êÇ©£º
| <a>, <address>, <area>, <b>, <bdo>, <big>, <blockquote>, <body>, <button>, <caption>, <cite>, <code>, <dd>, <dfn>, <div>, <dl>, <dt>, <em>, <fieldset>, <form>, <h1> to <h6>, <hr>, <i>, <img>, <input>, <kbd>, <label>, <legend>, <li>, <map>, <ol>, <p>, <pre>, <samp>, <select>, <small>, <span>, <strong>, <sub>, <sup>, <table>, <tbody>, <td>, <textarea>, <tfoot>, <th>, <thead>, <tr>, <tt>, <ul>, <var> |
Supported by the following JavaScript objects:
ËùÖ§³ÖµÄJavaScript¶ÔÏó£º
| layer, link |
In the following example we will display an alert box when the user moves the mouse pointer away from the image:
ÔÚÏÂÃæµÄÀý×ÓÖУ¬µ±Óû§µÄÊó±ê´ÓͼƬÉÏÒÆ¿ªÊ±½«»áµ¯³öÒ»¸öÏûÏ¢¿ò£º
<img src="image_w3default.gif" alt="W3POP" |
The output of the code above will be:
ÉÏÊö´úÂëµÄÊä³ö½á¹ûΪ£º
![]() |
In the following example we will add an image that should act as a link button on a web page. We will then add an onMouseOver event and an onMouseOut event that will run two JavaScript functions that will change between two images:
ÔÚÏÂÃæµÄÀý×ÓÖУ¬ÎÒÃÇÊ×ÏȼÓÈëÒ»ÕÅͼƬ×÷ΪÁ´½Ó¡£½Ó×ÅÎÒÃÇÏëÆä¼ÓÈëonMouseOverºÍonMouserOutʼþ£¬Ê¹ÆäÄܹ»ÔÚÁ½ÕÅͼƬ¼äÇл»£º
<html> <body> |
The output of the code above will be:
ÉÏÊö´úÂëµÄÊä³ö½á¹ûΪ£º
|
onmouseout
How to use onmouseout.
ÈçºÎÓ¦ÓÃonmouseout
ÆÀÂÛ (0)
All