Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 589
Chweng Mega Avatar asked Nov 21 '25 08:11

Chweng Mega


2 Answers

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

like image 53
epascarello Avatar answered Nov 22 '25 22:11

epascarello


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.

like image 25
Matus Avatar answered Nov 22 '25 21:11

Matus