top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

HTML: what is the difference between onclick, onmouseover and onmouseout.

0 votes
717 views

Sorry for simple question, need to clean some queryhome code.

Can someone help me to find out the difference between these three: onclick, onmouseover, onmouseout.

posted May 23, 2014 by Salil Agrawal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Not sure what you are looking for but following may help you to decide -

onmouseclick attribute of HTML element initiates some action predefined in a script associated with it, when user click on the element.

onmouseover attribute of HTML element initiates some action predefined in a script associated with it, when user moves the cursor into the boundary of the element.

onmouseout attribute of HTML element initiates some action predefined in a script associated with it, when user moves the mouse pointer any in any direction, irrespective of any mouse button actions on the element.

onmouseup attribute of an HTML element initiates some action predefined in a script associated with it, when user releases the mouse button while the cursor is positioned on the element.

onmousemove attribute of HTML element initiates some action predefined in a script associated with it, when user moves the mouse pointer any in any direction, irrespective of any mouse button actions on the element.

Example: Syntax for all cases are same...

<p onmouseup="myJsFunc();'">Hello, World</p>
answer May 23, 2014 by Santosh Prasad
Similar Questions
+4 votes

Let me explain my problem -
Lot of code in the QueryHome is generated by a single file and changing it is very risky. Using one of the operation we are generating the code which is adding onmouseout and onmouseover.
Now we want in a specific case where we want to add a special onmouseover on top of which is generated in the code. Now the question is it valid to have more then one onmouseover/onmouseout.

...