开发者

Having trouble finding elements in an HTML page

Haven't done serious JavaScript since 90s, so looks like a couple of things changed. I am trying to debug a page (i didn't write it). So in Chrome, I right-click on an element and select Inspect Element. It brings me to an element that looks like this:

<div class="divRte" style="height:100px; width:200px">...</div>

Easy enough, I think. Then open up the page sou开发者_开发问答rce (in browser) and there is no mention of divRte anywhere.

Where can I find it? Where is it?


The code you see in "View source" is the html that browser got from the server. BUT, that is not the source as the browser SEES it. When you make changes in DOM structure with JS, they don't appear in the view source. That's why you use firebug, which shows the exact DOM structure that browser sees at that moment.


It was obviously added there is the javascript. so you wont see it in the source doc

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜