I.e. we’ve got a #<HTMLDivElement>:
<div class="cool-class" name="2" action="someAction" id="ext100">button</div>
How can tags’ values be accessed?
E.g.
someActionfromactiontag, or2fromname?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
After you get the HTMLDivElement, for example coolElement, you can try this:
coolElement.attributes['name']and
coolElement.attributes['action'].In case the attribute exists, you can get the value with nodeValue
coolElement.attributes['attribute_name'].nodeValue