ted
ted

Reputation: 5329

ExtJS4 #<HTMLDivElement> tags

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.

Upvotes: 0

Views: 335

Answers (1)

U and me
U and me

Reputation: 740

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
    

Upvotes: 1

Related Questions