Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138163

"document.getElementsByClassName" found elements but can not access

$
0
0

I have a realy hard problem that I couldn't find any solution in Internet

I used document.getElementsByClassName to access one HTML Element by It's class, my element is filterRow of dxDataGrid:

 var filterRowElement = document.getElementsByClassName("dx-datagrid-filter-row");
                console.log(filterRowElement);
                console.log(filterRowElement.length);

My Problem is: The first console.log return HTMLCollection with length = 1 but the second return 0 (I tried to get length to access filterRowElement[0]).

I've tried console.log(filterRowElement[0]) and got undefined too

This is screen shoot: enter image description here

I don't know why, it is the first time I got this problem

Please give me some advise. Thank you!


Viewing all articles
Browse latest Browse all 138163

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>