Javascript onmousemove event

Source: Internet
Author: User
Definition and usage
Definition and usage

The onmousemove event occurs when the mouse pointer is moved.
Onmousemove event triggered when the mouse moves

Syntax
Syntax
Onmousemove ="Code"

Parameter
Parameters
Description
Note
Sometriccriptcode
Code to be executed
Required. specifies a JavaScript to be executed when the event occurs.
Required. Code to be executed when an event is triggered

Supported by the following HTML tags:
Supported HTML tags:

<A>, <address>, <area>, <B>, <BDO>, <big>, <BLOCKQUOTE>, <body>, <button>, <caption>, <cite>, <code>, <DD>, <dfn>, <div>, <DL>, <DT>, <em>, <fieldset>, <form>,

Supported by the following JavaScript objects:
Supported JavaScript objects:

Onmousemove is, by default, not an event of any object, because mouse movement happens very frequently.
Onmousemove is not an event of any object by default, because the mouse moves frequently.

Tips and notes
Note:

Note:Each time a user moves the mouse one pixel, A mousemove event occurs. It takes system resources to process all mousemove events. Use this event carefully!
Note:A mousemove event is triggered when the user moves one pixel. This will consume a lot of system resources. Please use it with caution.

Example
Instance

In the following example we will display an Alert box when the user moves the mouse pointer over the image:
In the following example, a message box is displayed when you move your mouse over the image:

Onmousemove = "alert ('w3pop! ') "/>

The output of the code above will be:
Output result:

Try-it-yourself demos
Interactive demonstration

Onmousemove
How to Use onmousemove.
How to Apply onmousemove
Reproduced http://www.w3pop.com/tech/school/jsref/jsref_onmousemove.asp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.