Chapter 39: HTML Event Attributes

HTML Form Events

Events triggered by actions inside a HTML form (applies to almost all HTML elements, but is most used in form
elements):

AttributeDescription
onblurFires the moment that the element loses focus
onchangeFires the moment when the value of the element is changed
oncontextmenuScript to be run when a context menu is triggered
onfocusFires the moment when the element gets focus
oninputScript to be run when an element gets user input
oninvalidScript to be run when an element is invalid
onresetFires when the Reset button in a form is clicked
onsearchFires when the user writes something in a search field (for )
onselectFires after some text has been selected in an element
onsubmitFires when a form is submitted

Keyboard Events

AttributeDescription
onkeydownFires when a user is pressing a key
onkeypressFires when a user presses a key
onkeyupFires when a user releases a key

Recent Posts

Securing phpMyAdmin Like a Pro: Essential Tips and Tricks

Securing phpMyAdmin is crucial to prevent unauthorized access and protect your databases. Here's a guide…

5 months ago

Pasqal raises $100M to build a neutral atom-based quantum computer

Pasqal, a Paris-based quantum computing startup, today announced that it has raised a $100 million…

1 year ago

Apple in talks with Disney, others on VR content for new headset: Report

Developed with Sony Group Corp, the headset will have two ultra-high-resolution displays to handle the…

1 year ago

Microsoft, Amazon results to highlight softening cloud business

After years of blistering growth, most recently fuelled by remote working and studying during the…

1 year ago

Intel chairman Omar Ishrak steps down

Omar Ishrak had stepped down and the chipmaker appointed board director Frank Yeary as his…

1 year ago

Canada to commercialise world's first photonic-based quantum computer

Canadian Prime Minister Justin Trudeau has announced a new federal investment to build and commercialise…

1 year ago