DOM Attribute

DOM Attribute

As we create HTML elements in JavaScript, we can create and delete their attributes.

hasAttribute

DOM hasAttribute ()

The hasAttribute () method returns true if the specified attribute exists, otherwise false.

JavaScript Event buttons

JavaScript Event buttons

The Buttons property returns a number that indicates which mouse button or mouse buttons are pressed when the mouse event is triggered.

DOM Event currentTarget

DOM Event currentTarget

The CurrentTarget event property returns an event listener that triggers the event when a user clicks a nested item.