Archive for the ‘IE’ Category

View the source code of dynamic contents of a web page

星期六, 三月 13th, 2010

Sometimes the source code of dynamic contents (like those rendered by AJAX) of a web page cannot be viewed by IE "View Source".

Solution 1
Use Firefox to view the source code of a certain part of dynamic contents by the following steps:

1. Highlight a certain part of dynamic contents
2. Right click
3. Select "View Selection Source"

Solution 2
Use IE to view the source code of the entire page by entering the following JavaScript in the address bar:

javascript:’<xmp>’ + window.document.body.outerHTML + ‘</xmp>’