开发者

Chrome doesnt display sourcecode that was added via Ajax

I am using Google Chrome to test my Webapplication. With Control-U you can see the sourcecode of a page.

However it does not display the html/css that was added by ajax or that was created by jQuery. How can I make su开发者_高级运维re that I see all sourcecode?


You can view the created source using the developer tools.

  1. On windows press Ctrl + Shift + J,
  2. Click on the elements tab and there is is.

You can also do a bunch of other stuff too.

Chrome doesnt display sourcecode that was added via Ajax


Try using the javascript inspector, similar to tools such as firebug in firefox. You can right click on an element and select "Inspect Element" to open it on that element. It should show you what was already there and what's been added through ajax.


You can serialize the document with XMLSerializer (Firefox, Chrome and Opera maybe IE (cannot test))

see this Fiddle


View Source doesn't work the same in Chrome as it does in some other browsers -- when chosen, it redownloads the page and displays the resulting HTML, rather than displaying the HTML that was used for the current page.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜