开发者

Firebug source and Mozilla Source difference

开发者 https://www.devze.com 2023-01-19 12:19 出处:网络
I have PHP generated HTML. Firebug shows me this source: <div class=\"module-header\"><div class=\"module-header2\"><div class=\"module-header3\"><h3 class=\"module-title\" sty

I have PHP generated HTML.

Firebug shows me this source:

<div class="module-header"><div class="module-header2"><div class="module-header3"><h3 class="module-title" style="visibility: visible;"><span>Մարդկային</span> ռեսուրսներ</h3></div></div></div>

Mozilla Source shows me another HTML for that part.

<div class="module-header"><div class="modu开发者_如何转开发le-header2"><div class="module-header3"><h3 class="module-title"><a href="/forum/6" class="block-title-link">Մարդկային ռեսուրսներ</a></h3></div></div></div>

Actually this part should work as link. But doesn't...


Firebug is showing you the actual page content at that exact moment, whereas "Show Source" is showing only the static HTML that got downloaded from the server.

If JavaScript is making any changes to the page, the two will be different. In this case, it looks like JavaScript is removing your link and hiding the h3 element.


I see a style="visibility: visible; in Firebug's source. Are you sure you are not messing with the HTML via Javascript and some .show() .hide()?

Firefox's Source is the way to go for static HTML -> There is no rendering difference from what you see in your browser window and the source you see with Right Mouse BUtton > View Source, but (there always is a but) if you change the source dynamically - e.g. via JS when hovering over one link it hides some other part of the website - the Firefox "View Source" will be wrong and not reflecting these dynamic changes - these you will only be able to see with Firebug.

Maybe you can try a different browser and see if it is working there as a link?

Javascript might interact with your page and could hide the link because of some pre-condition. Maybe you want to turn off Javascript and see if your link is working then?

0

精彩评论

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