自 90 年代以来就没有做过真正的 JavaScript,所以看起来有几件事发生了变化。我正在尝试调试一个页面(我没有写它)。所以在 Chrome 中,我右键单击一个元素并选择检查元素。它把我带到了一个看起来像这样的元素:
<div class="divRte" style="height:100px; width:200px">...</div>
很简单,我想。然后打开页面源(在浏览器中),任何地方都没有提到 divRte 。
我在哪里可以找到它?它在哪里?
自 90 年代以来就没有做过真正的 JavaScript,所以看起来有几件事发生了变化。我正在尝试调试一个页面(我没有写它)。所以在 Chrome 中,我右键单击一个元素并选择检查元素。它把我带到了一个看起来像这样的元素:
<div class="divRte" style="height:100px; width:200px">...</div>
很简单,我想。然后打开页面源(在浏览器中),任何地方都没有提到 divRte 。
我在哪里可以找到它?它在哪里?
It was obviously added there is the javascript. so you wont see it in the source doc
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.