Javascript Mouse Event
Want to understand Properly Plz see the video carefully on YouTube channel name is Adisma
Try It (Example)
<!DOCTYPE html> <html> <body> <script> function sayHello() { alert("Onclick event.") } </script> <p>Click Say Hello button and see result.</p> <form> <input type="button" onclick="sayHello()" value="Say Hello" /> </form> </body> </html>
Mouse Events
| Event | Occurs When |
|---|---|
| onclick | A user clicks on an element |
| oncontextmenu | A user right-clicks on an element |
| ondblclick | A user double-clicks on an element |
| onmousedown | A mouse button is pressed over an element |
| onmouseenter | The mouse pointer moves into an element |
| onmouseleave | The mouse pointer moves out of an element |
| onmousemove | The mouse pointer moves over an element |
| onmouseout | The mouse pointer moves out of an element |
| onmouseover | The mouse pointer moves onto an element |
| onmouseup | A mouse button is released over an element |
Comments
Post a Comment