Interactive Navigation Menu
Click the menu button to open or close the navigation.
onclick Event
Program 1: Display Alert on Click
Program 2: Change Text on Click
Initial Text
ondblclick Event
Program 3: Double Click to Change Color
Double click me
Program 4: Double Click to Show Message
Double click inside box
onsubmit Event
Program 5: Basic Form Submission
Program 6: Prevent Submit if Field Empty
onmouseover Event
Program 7: Highlight Box
Hover here
Program 8: Change Text on Hover
Hover on this text
onmouseout Event
Program 9: Reset Background Color
Move mouse out
Program 10: Message on Mouse Out
Move mouse away
onfocus Event
Program 11: Highlight Input on Focus
Program 12: Border Change on Focus
onblur Event
Program 13: Convert Text to Uppercase
Program 14: Validation on Blur
onchange Event
Program 15: Display Selected Option
Program 16: Change Background Based on Selection
onkeydown Event
Program 17: Show Key Pressed
Program 18: Block Number Keys
onkeyup Event
Program 19: Character Counter
Program 20: Live Uppercase
onload Event
Program 21: Alert on Page Load
Program 22: Initialize Content on Load
onmousedown Event
Program 23: Detect Mouse Press
Click and hold
Program 24: Change Text on Mouse Down
Press mouse here
onmouseup Event
Program 25: Detect Mouse Release
Release mouse here
Program 26: Restore Text on Release
Release mouse
onmousemove Event
Program 27: Log Mouse Movement
Move mouse here
Program 28: Show Coordinates
onerror Event
Program 29: Image Load Error

Program 30: Replace Image on Error

onresize Event
Program 31: Detect Resize
Program 32: Show Width on Resize
onselect Event
Program 33: Alert on Text Select
Program 34: Change Color on Selection
onunload Event
Program 35: Alert Before Leaving
Program 36: Log Page Exit
Button Interaction Panel
Use onclick, ondblclick to show messages, change text, and toggle colors.
Button Interaction Panel
Button Interaction Panel
No action performed yet
Text Formatter Tool
Convert input text to uppercase/lowercase using onblur, onkeyup.
Text Formatter Tool
Text Formatter Tool
Type text (live uppercase using onkeyup)
Formatted text will appear here
Color Theme Selector
Change page background using a dropdown with onchange.
Color Theme Selector
Color Theme Selector
Mouse Activity Box
Display messages for onmouseover, onmouseout, onmousemove.
Mouse Activity Box
Mouse Activity Box
Move your mouse over the box below
Mouse Box
Waiting for mouse action...
Simple Alert Form
Show alert on form submission using onsubmit.
Simple Alert Form
Simple Alert Form
Character Counter
Count characters in an input field using onkeyup.
Character Counter
Character Counter
Characters: 0
Focus Highlighter
Highlight input fields using onfocus and remove highlight using onblur.
Focus Highlighter
Focus Highlighter
Image Error Handler
Show fallback message/image using onerror.
Image Error Handler
Image Error Handler
If the image fails to load, a fallback message and image will appear.
Login Form Validation
Validate empty fields and email format using onsubmit + onblur.
Login Form Validation
Login Form Validation
Keyboard Activity Logger
Display pressed keys using onkeydown, onkeyup.
Keyboard Activity Logger
Keyboard Activity Logger
Click inside the input box and start typing.
Last Key Pressed: None
Last Key Released: None
Key Activity Log:
Copy Text Utility
Copy text between fields using onclick.
Copy Text Utility
Copy Text Utility
Use the buttons to copy text between fields.
Window Resize Tracker
Display window width/height using onresize.
Window Resize Tracker
Window Resize Tracker
Resize the browser window to see live updates.
Width: 0 px
Height: 0 px
Resize the window to start tracking.
Mouse Press Detector
Detect onmousedown and onmouseup to show interaction state.
Mouse Press Detector
Mouse Press Detector
Press and release the mouse button inside the box.
Interaction Area
Current State: Idle
Text Selection Notifier
Detect when text is selected using onselect.
Text Selection Notifier
Text Selection Notifier
Select any part of the text inside the input field.
No text selected yet
Hover Help Tooltip
Show help text on onmouseover, hide on onmouseout.
Hover Help Tooltip
Hover Help Tooltip
Hover over the help icons to see guidance.
Username should be at least 5 characters long.
Password must contain letters and numbers.
Form Reset Tracker
Show message when form is reset using onreset.
Form Reset Tracker
Form Reset Tracker
Fill the form and click Reset to see the event in action.
Form is ready
Interactive Navigation Menu
Toggle menu visibility using onclick, manage hover effects.
Interactive Navigation Menu
My Website
☰ Menu
Home
Courses
About
Contact
Interactive Navigation Menu
Click the menu button to open or close the navigation.
No menu item selected
Dynamic List Click Handler
Handle clicks on list items using event delegation.
Dynamic List Click Handler
Dynamic List Click Handler
Click any list item (even newly added ones).
- Item 1
- Item 2
- Item 3
No item clicked yet
Image Gallery Hover Preview
Change preview image using mouse events.
Image Gallery Hover Preview
Image Gallery Hover Preview
Hover over any thumbnail to preview the image.
Hover over a thumbnail to see preview
Custom Keyboard Shortcuts
Implement shortcuts like Ctrl+S using onkeydown.
Custom Keyboard Shortcuts
Custom Keyboard Shortcuts
Click inside the editor and try the keyboard shortcuts.
Available Shortcuts:
Ctrl + S → Save text
Ctrl + C → Show copy message
Ctrl + R → Reset editor
Esc → Clear status
No shortcut used yet
Scroll Activity Indicator
Show “Scrolling…” status using onscroll.
Scroll Activity Indicator
Scrolling...
Scroll Activity Indicator
Scroll the page to see live scroll activity.
Content Section 1
Content Section 2
Content Section 3
Content Section 4
Content Section 5
Content Section 6
Scroll Info
Position: 0 px
Direction: None
Disable Button After Submit
Prevent multiple submissions using onclick.
Disable Button After Submit
Disable Button After Submit
Click submit once. Multiple submissions are blocked.
Waiting for submission
Modal Popup System
Open/close modal using click and mouse events.
Modal Popup System
Modal Popup System
Click the button below to open the modal.
×
Modal Title
This is a modal popup window.
Click outside the modal or on the close button to close it.
Simple Drag Detection
Detect drag start/end using mouse events from the PDFs.
Simple Drag Detection
Simple Drag Detection
Click and drag the box inside the area.
Drag Me
Status: Not dragging
Page Exit Warning
Warn user before leaving page using onunload.
Page Exit Warning
Page Exit Warning
Try refreshing the page or closing the tab.
Page is active
This example uses onunload as described in the syllabus PDFs.
Student Registration Form
Uses onfocus, onblur, onchange, onsubmit.
Student Registration Form
Student Registration Form
Please fill all details carefully.
Interactive Quiz App
Uses click, keyboard, and submit events.
Interactive Quiz App
Interactive Quiz App
👉 Click options or press 1-4 to select
👉 Press Enter to go to next question
Question 1 of 3
Live Search Filter
Filter list items using onkeyup.
Live Search Filter
Live Search Filter
Type to search courses in real time.
- Web Development
- Graphic Design
- Data Analytics
- Java Programming
- Python Programming
- Digital Marketing
- UI UX Design
- Cyber Security
Showing 8 results
No matching results found
Theme Switcher Tool
Toggle light/dark mode using events.
Theme Switcher Tool
Theme Switcher Tool
This tool allows users to switch between Light and Dark mode
using events, just like modern applications.
Current Theme: Light
Tip: Press D on keyboard to toggle theme
Event Playground Page
One page demonstrating all major events learned.
JavaScript Event Playground
JavaScript Event Playground
Interact with each section to observe different JavaScript events.
1. Click Events
2. Mouse Events
Hover / Click Me
3. Keyboard Events
Key activity will appear here
4. Form Events
5. Text Selection Event
6. Image Error Event
7. Window Events
Resize or scroll the page