Reputation: 1668
I wanna retrive a table in this page,and do something
however I cant getElementById directly in console before I use chrome inspecter to select it.
I cant access to the source code so what should i do?
following screenshot show my issue
Use Chrome Inspector and clicked on the page .now I cant get this element
Upvotes: 3
Views: 4898
Reputation: 1418
In your first screenshot your console selector is "top", in your second screenshot the selector is "zhuti(content.aspx)" - that could indicate that element is not accessible in top document (maybe it is in an iframe?)
It would be helpful if you provide html or link to source page.
Upvotes: 5
Reputation: 207557
If you look at your screenshot, when it is undefined, it is top. When you select it, the selection changes to content.aspx
So that means the element resides inside of an iframe/frame. So you would need to change it to point to the correct element.
Upvotes: 8