In Web API there are elements which have accesskey attribute. To fetch this accesskey attribute we use HTMLElement.accessKeyLabel property, which returns a String assigned to the accesskey attribute of the element.
label = element.accessKeyLabel
Note: If the accesskey attribute value is not provided then it returns an empty String.
Example: Height attribute set to 300
Click the button:
When the button is clicked:
- Firefox 8
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.