HTML

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

Unlocking the Secrets of JSON.stringify(): More Than Meets the Eye

JSON (JavaScript Object Notation) is a lightweight data-interchange format widely used in web development. At…

2 months ago

How to Handle AJAX GET/POST Requests in WordPress

AJAX (Asynchronous JavaScript and XML) is a powerful technique used in modern web development that…

3 months ago

Page Speed Optimization: Post-Optimization Dos and Don’ts

Introduction After successfully optimizing your website for speed, it's essential to maintain and build upon…

3 months ago

Ultimate Guide to Securing WordPress Folders: Protect Your Site from Unauthorized Access

Securing your WordPress folders is crucial to safeguarding your website from unauthorized access and potential…

4 months ago

HTML CSS PHP File Upload With Circle Progress Bar

Creating a file upload feature with a circular progress bar involves multiple steps. You'll need…

4 months ago

Using WP Rocket with AWS CloudFront CDN

Integrating WP Rocket with AWS CloudFront CDN helps to optimize and deliver your website content…

4 months ago