As this code comparison has shown, jQuery code is typically shorter and clearer than its basic JavaScript equivalent. However, this doesn't mean we will always write code that is free from bugs, or that we will intuitively understand what is happening on our pages at all times. Our jQuery coding experience will be much smoother with the assistance of standard development tools.
正如展示的代码对比,jquery的代码和原生js代码对比要更短,更清晰。然而,这不意味着,我们将总是能够写出没有bug的代码,或者我们总是能直观的理解正在我们的网页上发生了什么。借助于标准的开发工具,我们的jquery代码体验将变的更加流畅。
? The Internet Explorer Developer Tools:http://msdn.microsoft.com/en-us/library/dd565628.aspx
? The Safari Web Inspector:http://developer.apple.com/technologies/safari/developer-tools.html
? The Chrome Developer Tools:http://code.google.com/chrome/devtools/
? Firebug for Firefox: http://getfirebug.com/
高质量的开发工具在所有的现代浏览器中都是是可以找到的,我们可以自由使用对我们来说最舒适的环境。可选项包括:
1、IE开发者工具:http://msdn.microsoft.com/en-us/library/dd565628.aspx
2、Safari web工具:http://developer.apple.com/technologies/safari/developer-tools.html
3、Chrome开发者工具:http://code.google.com/chrome/devtools/
4、火狐中的firebug:http://getfirebug.com
Each of these toolkits offers similar development features, including:
? The ability to explore and modify aspects of the DOM
? Investigating the relationship between CSS and its effect on page presentation
? Convenient tracing of script execution through special methods
? Pausing execution of running scripts and inspecting variable values
? The ability to explore and modify aspects of the DOM
? Investigating the relationship between CSS and its effect on page presentation
? Convenient tracing of script execution through special methods
? Pausing execution of running scripts and inspecting variable values
这些工具提供了类似的开发特点,包括:
1、探索和修改DOM展示的能力
2、研究css和他在网页中呈现效果的关系。
3、通过特殊的方法方便的追踪js的执行。
4、暂停正在执行的脚本,查看变量的值。
While the details of these features vary from one browser to the next, the general concepts remain constant. In this book, some examples will require the use of one of these toolkits; we will use Firebug for these demonstrations, but development tools for other browsers are fine alternatives.
尽管这些特点的细节在不同浏览器中是不同的,但是一般的概念是相同的。在这本书中,一些例子需要使用其中的一种工具,我们将使用firebug作为展示,但是其他浏览器中的开发工具也是很好的替代品。