An Introduction to the Internet Explorer Developer Toolbar

本文介绍了一款由微软推出的Internet Explorer Developer Toolbar,旨在帮助开发者更好地理解和分析网页结构。该工具提供了DOM探索、元素选择、样式追踪等功能,使得查看网页源代码变得更加直观。本文还介绍了其安装与使用方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

If you're like most Web developers, when you were first learning HTML, you probably spent a great deal of your time playing around with your browser. The fact that you could simply do a "View Source" and see how an interesting web page was implemented was one of the things that helped HTML catch on so quickly. This "code sharing" is undoubtably one of the reasons the Web was able to grow as quickly as it did.

Unfortunately, these days it's not so easy to take a look at the magic going on behind the scenes of the average web page. With the emphasis on usability and appearance, the previously simple HTML has become incresingly difficult to read and these days most web pages are made up of a combination of several files and use often use as much CSS and client-side script as they do HTML. Using "View Source" simply doesn't cut it anymore. Luckily Microsoft has realized this fact and is building a tool to help developers analyze these increasingly complex web documents. It's called the Internet Explorer Developer Toolbar. In this article I'll give you a quick introduction to this powerful new tool and examine some of it's most useful features.

Download and Installation

As I write this, the latest version of the toolbar is the Internet Explorer Developer Toolbar Beta 3. As with all pre-release software, it may contain bugs and you shouldn't expect any official support from Microsoft. I've been using it on Windows XP Pro with IE 6 and haven't run into any problems, but that doesn't mean that you won't.

You can download the toolbar from the following link:

http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en

On that page you'll also find Microsoft's overview of the tool which I've included below for reference.

Overview

The Internet Explorer Developer Toolbar provides several features for exploring and understanding Web pages. These features enable you to:

  • Explore and modify the document object model (DOM) of a Web page.
  • Locate and select specific elements on a Web page through a variety of techniques.
  • Selectively disable Internet Explorer settings.
  • View HTML object class names, ID's, and details such as link paths, tab index values, and access keys.
  • Outline tables, table cells, images, or selected tags.
  • Validate HTML, CSS, WAI, and RSS Web feed links.
  • Display image dimensions, file sizes, path information, and alternate (ALT) text.
  • Immediately resize the browser window to a new resolution.
  • Selectively clear the browser cache and saved cookies. Choose from all objects or those associated with a given domain.
  • Choose direct links to W3C specification references, the Internet Explorer team weblog (blog), and other resources.
  • Display a fully featured design ruler to help accurately align and measure objects on your pages.
  • Find the style rules used to set specific style values on an element.
  • View the formatted and syntax colored source of HTML and CSS.

The Developer Toolbar can be pinned to the Internet Explorer browser window or floated separately.

This Beta 3 version of the toolbar contains functionality and stability enhancements over previous versions, including:

  • Style Tracer: Right mouse click on a style value for an element and select Style Tracer to find the style rule that is effecting that value.
  • CSS Selector Matches: View a report of all style rules set and how many times they are used on the current page.
  • View Source: View the formatted and syntax colored source of the original page, currently rendered page, element or element with the styles that are effecting it.

Your feedback is greatly appreciated. Please visit the Developer Toolbar Wiki on Channel 9 to enter bug reports, comments, and suggestions.

You'll need at least Windows 2000 and IE 6, but I assume that's not an issue for most developers these days. Installation went off without a problem for me. It's about as simple as possible although you still need to agree to the license agreement and click "Next" about half a dozen times before you're through.

After installation was complete I still needed to manually add the toolbar's button to IE's toolbar. In IE 6, you do this by right clicking on the toolbar and choosing "Customize...". That brings up the "Customize Toolbar" dialog box which should have the "IE Developer Toolbar" button available to be added to the toolbar.

In IE 7, the process is similar, but the names have changed. After right clicking on IE's toolbar you choose "Customize Command Bar -> Add or Remove Components..." in order to get to the "Customize Toolbar" screen.

After adding the button to the toolbar, IE's toolbar should now have an icon like the one shown below.

The Main Window

Clicking the icon discussed above brings up the toolbar's main window. By default, the window is docked in the bottom half of IE and looks something like this.

If you prefer, you can click the icon in the upper right corner to detatch the window from IE altogether.

The heart of the program is the DOM Explorer which lets you drill down into a page's HTML and examine the different attributes and styles related to the objects on the page. So instead of wading through tons of HTML, you simply find the item in the page hierarchy and the toolbar display its properties for you. But what if you can't find the element of interest in the hierarchical tree? No problem... the toolbar let's you select a page element simply by clicking on it and then finds it for you.

While the DOM Explorer is the heart and soul of the program, it also includes tons of other useful tools. I won't go into detail on all of them, but here are some quick highlights.

It shows image information, including dimensions, size, and path:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值