One of the best tools I have found for looking at client script in a Web page is a little trick with a Favorite (or bookmark). If you add a new Internet Explorer Favorite or Firefox bookmark with this code in it:
javascript:document.write("<xmp>"+document.documentElement.innerHTML+"</xmp>");
then you can click on this favorite in any page and it will show you the "true" source of the page, including any dynamically rendered client script at the time. HTML DOM afficionados will recognize the <XMP> (example) tag which simply tells the browser, "show this all the way it is, don't try to interpret it".
My favorite has a nice colorful "key" icon that makes it easy to find in the list of Favorites and it is named, appropriately, "DEBUGJS".
No comments:
Post a Comment