Chweng Mega
Chweng Mega

Reputation: 1668

Can't get element in Chrome Dev Tools unless I inspect it manually

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

Cannot access to cannot access to

Use Chrome Inspector and clicked on the page .now I cant get this element can access it now

Upvotes: 3

Views: 4898

Answers (2)

Matus
Matus

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

epascarello
epascarello

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.

enter image description here

Upvotes: 8

Related Questions